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

Something strange in timm.py #38

Open
santialferez opened this issue May 28, 2021 · 1 comment
Open

Something strange in timm.py #38

santialferez opened this issue May 28, 2021 · 1 comment

Comments

@santialferez
Copy link

Hi,

Thank you for your amazing work with wwf!

I think that there's something strange in L49, because the third input of create_timm_model is cut, but in that line is default_split.

There isn't an error because in L29 the parameter cut is forced to be None

Best

@santialferez
Copy link
Author

Also in https://walkwithfastai.com/vision.external.timm there is an error in:

frozen = filter(lambda p: not p.requires_grad, learn.model.parameters())
frozen = sum([np.prod(p.size()) for p in unfrozen_params])
model_parameters = filter(lambda p: p.requires_grad, learn.model.parameters())
unfrozen = sum([np.prod(p.size()) for p in model_parameters])

It should be:

unfrozen_params = filter(lambda p: not p.requires_grad, learn.model.parameters())
frozen = sum([np.prod(p.size()) for p in unfrozen_params])
model_parameters = filter(lambda p: p.requires_grad, learn.model.parameters())
unfrozen = sum([np.prod(p.size()) for p in model_parameters])

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

1 participant