walkwithfastai / walkwithfastai.github.io

Host for https://walkwithfastai.com
Other
143 stars 53 forks source link

Lesson 5 - EfficientNet and Custom Pretrained Models errors on Google Colab #32

Closed ne1s0n closed 3 years ago

ne1s0n commented 3 years ago

I went to https://walkwithfastai.com/EfficientNet_and_Custom_Weights and clicked on "Open in Colab" button. In Colab I set up hardware acceleration to GPU and started executing the cells.

The notebook runs as expected up to the instruction:

body = create_timm_body('efficientnet_b3a', pretrained=True)

which generates the error:

NameError: name '_update_first_layer' is not defined

It's probably an issue of versions. In the website it shows:

but on Colab it gets:

Probably the newer fastai version masks the _update_first_layer function. In fact adding a cell with the function definition pasted from here allows the notebook to run as expected.

muellerzr commented 3 years ago

Thanks @ne1s0n! I've adjusted it.