-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
train_data = train_data.transpose((0, 3, 1, 2)) ValueError: axes don't match array #4
Comments
I'm running into a similar error with a different piece of code. How did you solve this? |
Check the train folder location. You read exactly 0 images. That's the issue. |
Anyone from this issue, could you please explain why exactly do we use transpose((3,2,0,1))? |
In Theano backend, channels should be on the second axis in array. But when we read with CV2 it's on the last place, So we just move it to needed location. Let's say we have following tensor after reading images: (1000, 224, 224, 3) but we need it this way: (1000, 3, 224, 224) so we transpose it. |
Instead of: |
I was getting a similar error. Resolved now. |
Hey, can you please help me fix this error?
The text was updated successfully, but these errors were encountered: