Comments (4)
I'm confused about the very last code cell in the notebook, but maybe I'm just overtired:
body = create_timm_body('efficientnet_b3a', pretrained=False)
head = create_head(3072, dls.c)
model = nn.Sequential(body, head)
apply_init(model[1], nn.init.kaiming_normal_)
learn = Learner(dls, model, loss_func=LabelSmoothingCrossEntropy(),
splitter=default_split, metrics=accuracy)
learn.freeze()
learn.fit_one_cycle(5, 3e-3)
I would think here since the net is being loaded with pretrained=False, that you would use apply_init(model, nn.init.kaiming_normal_)
and not freeze the network. I could be missing something though, just trying to check my understanding.
from practical-deep-learning-for-coders-2.0.
Aha! Totally my fault, my bad :) yes you are right. We probably should be initializing the whole thing there, not just the head. (Along with not freezing) I can try to get to it here in the next few days, but a PR would be more than welcome 😊
from practical-deep-learning-for-coders-2.0.
Yes, but we also are using pretrained weights there so it doesn’t matter in the long run (notice we load old weights in), as we don’t train with the uninitialized body, we instead use the body from our other model
from practical-deep-learning-for-coders-2.0.
No problem, it took me a while to realize while playing with a very non-imagenet-like dataset :) Just glad I was understanding correctly! Will try to make a PR tomorrow.
from practical-deep-learning-for-coders-2.0.
Related Issues (20)
- default path is a hidden folder HOT 1
- emb_drop is not a parameter of tabular_learner HOT 3
- Changing header columns in df gives error while forming lm dataloader HOT 2
- 04_TabNet run error HOT 2
- Tabular 01 Adults will not open HOT 1
- ClassConfusion won't install in Google Colab HOT 8
- Optimization for bigger dataset while using HOT 1
- issue with CropSignal in Audio notebook HOT 4
- TypeError: object of type 'int' has no len() HOT 1
- learn.validate(dl=dl) throws 'DataFrame' object has no attribute 'with_cont' HOT 14
- Much time for ShapInterpretation HOT 2
- 'function' object has no attribute 'sizes'
- TabNet explainability on custom data HOT 6
- one hot for new data : what to do if new unseen in training data set categories are located in test data HOT 1
- unet_config has been replaced by create_unet_model
- Notebook on Efficientnet runs into error on Colab HOT 3
- Learn.sumary() error in 06-Object_detection.ipynb notebook HOT 5
- Hello there
- Lesson 3 - Cross-Validation for loop typo
- small mistake in "2_Regression_and_Permutation_Importance.ipynb" and lesson 2 of walkwithfastai
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from practical-deep-learning-for-coders-2.0.