How to implement Resnext、Senet or other models in fastaiv1? @ sgugger
thanks:拥抱:
1 Like
I guess you need to build your model in PyTorch, inheriting from nn.Module
, and then make it to conform to fastai interface, i.e., body/head split, split into differential learning rates groups, etc. Then you can train it as other built-in models.
Is a simpler way in the release plan? To me it was one of the selling points of pre-1.0 that you could so easily switch.
1 Like
To add to @devforfu for the splitting mechanism, you need to split four parts of the model in different nn.Sequential
layers, without that it’s pretty much as same as a nn.Module
I guess. You can write models.resnet50
in an empty cell and run it, and check the output
Probably it is worth to check devs subforum or place a feature request here to be sure.