Open ghost opened 6 years ago
Based on the error message, I think the problem is not relevant to the version. Obviously, you have gotten the keys, which are just different from the keys of the test model.
If you use the caffe2pytorch model to test, you should change the line 38 of test_pose.py from name = k[7:] to name = k.
If not, please debug~
Thanks for your quick response.
I used the model in Google Drive to test. Could you tell me where I should change.
Sorry, I changed the line 38 of test_pose.py from name = k[7:] to name = k and the error vanished.
But, I get other error:
Traceback (most recent call last):
File "test_pose.py", line 320, in
Maybe you can try change mask = np.ones((1, 1, input_img.shape[2] / stride, input_img.shape[3] / stride), dtype=np.float32) from mask = np.ones((1, 1, int(input_img.shape[2] / stride), int(input_img.shape[3] / stride)), dtype=np.float32)
But I'm not sure. I don't know the rule of python3 or your numpy.
I did not get the error. Thenk you very mach
Hi,
I just ran the pose_estimation.py
to do sanity check and I also got this error.
File "hand_net.py", line 180, in <module>
print(PoseModel(19, 6, True, False))
File "hand_net.py", line 155, in PoseModel
model = Pose_Estimation(net_dict, batch_norm)
File "hand_net.py", line 15, in __init__
self.model0 = self._make_layer(net_dict[0], batch_norm, True)
File "hand_net.py", line 50, in _make_layer
key = one_layer.keys()[0]
TypeError: 'dict_keys' object does not support indexing
After I change key = one_layer.keys()[0]
to key = list(one_layer.keys())[0]
, I then got
print(PoseModel(19, 6, True, False))
File "hand_net.py", line 155, in PoseModel
model = Pose_Estimation(net_dict, batch_norm)
File "hand_net.py", line 20, in __init__
self.model2_1 = self._make_layer(net_dict[2][0], batch_norm)
IndexError: list index out of range
Any idea what's going on here? Thanks!
Hi,
When I run test_pose.py, I get this error: TypeError: 'dict_keys' object does not support indexing
So, I changed "one_layer.keys()[0]" to "list(one_layer.keys())[0]". But, I get new error: KeyError: 'unexpected key "0.weight" in state_dict'
My Python's version is 3 and anaconda's version is 3. So, Please code of python3 version or solution.
Thank you