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

TypeError: Can't broadcast (128, 200704) -> (128, 1024, 14, 14) #5

Open
liuziyi219 opened this issue Aug 15, 2020 · 1 comment
Open

Comments

@liuziyi219
Copy link

Hi,I'm getting this error TypeError: Can't broadcast (128, 200704) -> (128, 1024, 14, 14) when running extract_features.py. The error is at line 133 output_h5["features"][counter : counter + len(batch)] = output_features.cpu().numpy()

@deluzhao
Copy link

Not sure if you still need this (hopefully this could be helpful for others), but I believe that you can simply reshape the output_features to (128, 1024, 14, 14).

EX: After the error line, insert a "output_features = np.reshape(output_features, (128, 1024, 14, 14))" seems to work for me. Let me know if this runs into any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants