Closed hwasiti closed 5 years ago
Hi @hwasiti, I haven't updated the repo for a while, actually I have already added these models to fastai in "fastai/fastai/vision/models/cadene_models.py", you can use it directly.
Your error is caused by a change in fastai's create_body
function. You can use use the "cadene_models.py" directly, the trick is to set cut
to noop
rather than None
.
Hi @PPPW
Yes I have seen that you have added it to fastai/fastai/vision/models/cadene_models.py
. And it was much nicer to use it from there. But when I have tried it, and checked that whether there are proper split points by:
get_groups(nn.Sequential(*learn.model[0], *learn.model[1]), learn.layer_groups)
returned nothing.
So I supposed that maybe the differential learning rates would not work. That's why I tried the manual split method by using the above code.
Is my understanding correct that there is no spliting to groups happening with your suggestion?
Also there are few other models have not been added yet to fastai/fastai/vision/models/cadene_models.py
like se_resnext101_32x4d
, but that worked fine by the above code without any issues.
I haven't quite understood your workaround: _You can use use the "cadenemodels.py" directly, the trick is to set cut to noop rather than None.
Hi @hwasiti,
I see, are you talking about "pnasnet5large"? The Cadene's implementation of this one is different from other models, so we have to do something different. One way is to set cut
to noop
rather than None
in the model_meta[pnasnet5large]
(the code in your original post). This is because of a change in create_body
, my notebook was out of date.
Alternatively, you can import and use the models directly, just like ResNet. I have some examples in this notebook. This is the notebook I used to test "cadene_models.py" before submitting the pull request, so you can find some examples there.
Hope it helps!
Great!
Both your methods worked.
It did not returned any groups because I had to check pnasnet5large groups by: 'get_groups(nn.Sequential(learn.model[0][0].children(), learn.model[1]), learn.layer_groups)'
which is a bit different than others with the extra models dimension.
Many thanks!
Sounds good, glad it helps!
There is a weird
StopIteration:
error happens only with this model.Example:
Error: