Insightface: AssertionError: Shape of unspecified array arg:conv0_weight changed. This can cause the new executor to not share parameters with the old one. Please check for error in network.If this is intended, set partial_shaping=True to suppress this warning

Created on 14 Jun 2018  路  7Comments  路  Source: deepinsight/insightface

when i use test.py,meet this error ,I try many mxnet Version ,but not reolve .who can ask me the reason,Thanks!
python deploy/test.py --model models/model-r34-amf/model,0

File "deploy/test.py", line 29, in
f1 = model.get_feature(img)
File "/home/wcy/face/insightface/deploy/face_model.py", line 92, in get_feature
self.model.forward(db, is_train=False)
File "/usr/lib/python2.7/site-packages/mxnet-1.2.0-py2.7.egg/mxnet/module/module.py", line 610, in forward
self.reshape(new_dshape, new_lshape)
File "/usr/lib/python2.7/site-packages/mxnet-1.2.0-py2.7.egg/mxnet/module/module.py", line 471, in reshape
self._exec_group.reshape(self._data_shapes, self._label_shapes)
File "/usr/lib/python2.7/site-packages/mxnet-1.2.0-py2.7.egg/mxnet/module/executor_group.py", line 382, in reshape
self.bind_exec(data_shapes, label_shapes, reshape=True)
File "/usr/lib/python2.7/site-packages/mxnet-1.2.0-py2.7.egg/mxnet/module/executor_group.py", line 358, in bind_exec
allow_up_sizing=True, **dict(data_shapes_i + label_shapes_i))
File "/usr/lib/python2.7/site-packages/mxnet-1.2.0-py2.7.egg/mxnet/executor.py", line 430, in reshape
"If this is intended, set partial_shaping=True to suppress this warning.")
AssertionError: Shape of unspecified array arg:conv0_weight changed. This can cause the new executor to not share parameters with the old one. Please check for error in network.If this is intended, set partial_shaping=True to suppress this warning.

Most helpful comment

found it
img = cv2.imread('./002')
img = model.get_input(img)
f = model.get_feature(img)

All 7 comments

solve

@wuchuanying I met the same problem, could you please share how to solve it? thank you

@wuchuanying Wow, same error I met too. Could you tell us the solution?

Note image input

how note image? @wuchuanying

found it
img = cv2.imread('./002')
img = model.get_input(img)
f = model.get_feature(img)

nimg = cv2.cvtColor(nimg, cv2.COLOR_BGR2RGB)
aligned = np.transpose(nimg, (2,0,1))

Was this page helpful?
0 / 5 - 0 ratings