MXNet Forum

Gluon load model error


#1

code:
deserialized_net = gluon.nn.SymbolBlock.imports(“save-symbol.json”, [‘data’], “save-0012.params”)

error message:
ValueError: There are multiple outputs with name “fcn0_resnetv1b0_layers1_relu0_fwd_output”

How can I fix this?


#2

It seems like a known problem, but it hasn’t been fixed yet. You can try to do the same thing as @wfus did - delete one of the definitions from JSON manually.


#3

Thank you very much for your help,and then after that show :
AssertionError: Parameter ‘fcn0_resnetv1b0_conv0_weight’ is missing in file ‘save-0001.params’, which contains parameters: ‘fcn3_resnetv1b0_conv0_weight’, ‘fcn3_resnetv1b0_batchnorm0_gamma’, ‘fcn3_resnetv1b0_batchnorm0_beta’, …, ‘fcn3__fcnhead1_hybridsequential0_batchnorm0_running_mean’, ‘fcn3__fcnhead1_hybridsequential0_batchnorm0_running_var’, ‘fcn3__fcnhead1_hybridsequential0_conv1_weight’, ‘fcn3__fcnhead1_hybridsequential0_conv1_bias’. Please make sure source and target networks have the same prefix.

But isn’t my prefix the same, is save


#4

It is hard to say why it happens… Anyway, even removing items manually from JSON shouldn’t be a thing to do.
I have updated the issue with an example of how to reproduce. I hop that some of the community members will reply.


#5

Thank you very much for your patient help


#6

Follow the error and modify the json file.It can help us compile successfully