-
Notifications
You must be signed in to change notification settings - Fork 3
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
ResNet18: incompatible architecture and pretrained parameters #18
Comments
This other approach with
Here I only checked that two of the pretrained parameter arrays are equal. I am also unsure of the effects of the state being ignored when loading the model and the pretrained parameters. |
I see that is the problem. The initial weights were imported in Lux 0.4, and since some defaults changed it led to this breakage.
States not being preserved means that your predictions won't be correct. Specify |
ResNets are transformed into Lux from Metalhead using the
resnet
function.transform
is yielding aChain
with twoChain
s in it, each containing a number of layers. We can also see this if we useLux.setup
on the model.There is the option to pass
pretrained = true
to theresnet
function. However, the pretrained parameters loaded by_initialize_model
are a "flattened" named tuple of 14 layers.Therefore, the model architecture and the pretrained parameters are not compatible.
The text was updated successfully, but these errors were encountered: