We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I wanted to use light-weight base models from torchvision like mobilenet, squeezenet and densenet. Any tips on how to edit the code?
The text was updated successfully, but these errors were encountered:
To add a new backbone, you should do the following steps:
Create an inherited class from backbone.base.Base, then override the method features
backbone.base.Base
features
class DenseNet161(backbone.base.Base): def __init__(self, pretrained: bool): super().__init__(pretrained) def features(self) -> Tuple[nn.Module, nn.Module, int, int]: densenet161 = torchvision.models.densenet161(pretrained=self._pretrained) ...
In backbone/base.py, add a new branch for your new backbone, and don't forget to extend the options
backbone/base.py
Specific new backbone to script
$ python train.py -s=xxx -b=densenet161
Hope this helps.
Sorry, something went wrong.
Thanks for the prompt reply, I'm now working to get the right dimensions for
No branches or pull requests
Hi, I wanted to use light-weight base models from torchvision like mobilenet, squeezenet and densenet. Any tips on how to edit the code?
The text was updated successfully, but these errors were encountered: