Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colab doesn't work #90

Open
dkoes opened this issue Jul 28, 2022 · 2 comments
Open

colab doesn't work #90

dkoes opened this issue Jul 28, 2022 · 2 comments

Comments

@dkoes
Copy link

dkoes commented Jul 28, 2022

Trying to run the example colab notebook fails with the error
AttributeError: 'EfficientNet' object has no attribute 'act1'

This is because there is no act1 attribute in the model returned by timm.create_model('tf_efficientnet_lite0', pretrained=True)

It is also the case that this model only has 7 blocks, yet _make_efficientnet seems to assume there's at least nine, which is concerning:

def _make_efficientnet(model):
    pretrained = nn.Module()
    pretrained.layer0 = nn.Sequential(model.conv_stem, model.bn1, model.act1, *model.blocks[0:2])
    pretrained.layer1 = nn.Sequential(*model.blocks[2:3])
    pretrained.layer2 = nn.Sequential(*model.blocks[3:5])
    pretrained.layer3 = nn.Sequential(*model.blocks[5:9])
    return pretrained
@woctezuma
Copy link

@nhatdfo
Copy link

nhatdfo commented Dec 20, 2022

!pip install timm==0.5.4
try this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants