Problem about collect_params().save()

When I use “net.collect_params(‘sequential2_conv6_weight|sequential2_conv6_bias|sequential2_batchnorm6_gamma|’

to save parameters, I can’t load them. Because it says that ndarray.load(filename) is a list rather than a dict.

I wonder what’s wrong.

Could you post the exact code that you are trying to write?
what you can do is

from mxnet import nd
net.collect_params().save('myparams.params', strip_prefix=net.prefix)
params = nd.load('myparams.params')

params is a dictionary where each key is a parameter name and each value is an ndarray containing the value of the parameters. Hope that helps