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
DFL-CNN <==> Part1 : prepare for parameters <==> Begin DFL-CNN <==> Part1 : prepare for parameters <==> Done DFL-CNN <==> Part2 : Load Network <==> Begin Traceback (most recent call last): File "main.py", line 180, in main() File "main.py", line 91, in main model = DFL_VGG16(k = 10, nclass = 200) File "/home/steven/Documents/test/DFL-CNN/model/DFL.py", line 13, in init vgg16featuremap = torchvision.models.vgg16_bn(pretrained=True).features File "/usr/local/lib/python3.5/dist-packages/torchvision/models/vgg.py", line 130, in vgg16_bn return VGG(make_layers(cfg['D'], batch_norm=True), **kwargs) TypeError: init() got an unexpected keyword argument 'pretrained'
Hello dejia when I reappearance your code this error happened ,Where is the problem?
The text was updated successfully, but these errors were encountered:
Maybe the version of torchvision should be updated.
Sorry, something went wrong.
https://forums.fast.ai/t/forward-got-an-unexpected-keyword-argument-pretrained/80582
Try this, it worked for me.
import fastai model = fastai.vision.model.YOURMODELHERE
No branches or pull requests
DFL-CNN <==> Part1 : prepare for parameters <==> Begin
DFL-CNN <==> Part1 : prepare for parameters <==> Done
DFL-CNN <==> Part2 : Load Network <==> Begin
Traceback (most recent call last):
File "main.py", line 180, in
main()
File "main.py", line 91, in main
model = DFL_VGG16(k = 10, nclass = 200)
File "/home/steven/Documents/test/DFL-CNN/model/DFL.py", line 13, in init
vgg16featuremap = torchvision.models.vgg16_bn(pretrained=True).features
File "/usr/local/lib/python3.5/dist-packages/torchvision/models/vgg.py", line 130, in vgg16_bn
return VGG(make_layers(cfg['D'], batch_norm=True), **kwargs)
TypeError: init() got an unexpected keyword argument 'pretrained'
Hello dejia
when I reappearance your code this error happened ,Where is the problem?
The text was updated successfully, but these errors were encountered: