Closed Danee-wawawa closed 6 years ago
def init_weight(self, cfg, arg_params, aux_params):
for k in self.arg_shape_dict:
if 'weight' in k and k not in arg_params:
arg_params[k] = mx.random.normal(0, 0.01, shape=self.arg_shape_dict[k])
if 'bias' in k and k not in arg_params:
arg_params[k] = mx.nd.zeros(shape=self.arg_shape_dict[k])
elif k not in arg_params:
arg_params[k] = mx.random.normal(0, 0.01, shape=self.arg_shape_dict[k])
just do like this
I trained the network on the pre-trained model Resnet 50, which is downloaded from http://data.mxnet.io/models/imagenet/resnet/50-layers/resnet-50-0000.params.
However, there is an error "AssertionError: conv1_weight not initialized".
I think it may be the problem of the pre-trained model Resnet 50. Can anyone share the useful pre-trained model Resnet 50 with me, or help me find the problem? Thank you very much.