Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valPCK.py cant work #1

Closed
csysl opened this issue May 23, 2018 · 4 comments
Closed

valPCK.py cant work #1

csysl opened this issue May 23, 2018 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@csysl
Copy link

csysl commented May 23, 2018

No description provided.

@mpskex
Copy link
Owner

mpskex commented May 23, 2018

Can you describe it in detail? 你能说的再详细点么?

@csysl
Copy link
Author

csysl commented May 23, 2018

运行valPCK.py后在103行报错:
ValueError: operands could not be broadcast together with shapes (16,2) (17,2)
报错的代码
for n in range(len(Global.joint_list)): err[_iter*paral+n] = np.linalg.norm(w[n]*(j_gt[n,:,:]-j_dt[n,:,-1::-1]),axis=1) / np.linalg.norm(j_gt[n,normJ_a,:]-j_gt[n,normJ_b,:], axis=0)

代码96行得到的j_gt的shape为(2,16,2)
代码99行得到的预测结果 j_dt的shape为(2,17,2)

mpskex added a commit that referenced this issue May 24, 2018
This is caused by the wrong dimension declaration of the joint vector list in predict.py
@mpskex mpskex self-assigned this May 24, 2018
@mpskex mpskex added the bug Something isn't working label May 24, 2018
@csysl
Copy link
Author

csysl commented May 24, 2018

谢谢回复!
运行最新的代码后,报错
ValueError: could not broadcast input array from shape (17,2) into shape (16,2)
代码在predict.py的178行
j[idx], w[idx] = joints_pred_numpy(r_pred_map, np.expand_dims(_img_list[idx], 0), thresh=thresh)

mpskex added a commit that referenced this issue May 24, 2018
@mpskex
Copy link
Owner

mpskex commented May 25, 2018

请回复代码是否解决问题。谢谢

@mpskex mpskex closed this as completed May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants