Image classification: could not broadcast input array from shape into shape
See original GitHub issueReceiving this error trying to run a simple image classification example
File "/Users/colinpetit/.pyenv/versions/3.6.5/lib/python3.6/site-packages/ludwig/features/image_feature.py", line 101, in add_feature_data
data[feature['name']][i, :, :, :] = img
ValueError: could not broadcast input array from shape (743,620,3) into shape (383,442,4)
model_definition_file:
input_features:
-
name: img
type: image
encoder: stacked_cnn
output_features:
-
name: type
type: category
training:
epochs: 10
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Getting an error saying " could not broadcast input array from ...
I am working on an image classification problem where I have to deal with input images of 19 channels. I was successful in...
Read more >could not broadcast input array from shape (1600,860,3) into ...
I am trying to extract image feature but i keep gives me this error: Traceback (most recent call last): File ...
Read more >ValueError could not broadcast input array from shape 360 ...
In the above error it shows could not broadcast input array from shape (360,270,3) into shape (360,280,3), means you are tying to exchange ......
Read more >Could not broadcast input array from shape - Faceswap Forum
Hi,. I have an error when I try to train my model : 01/04/2021 09:22:42 ERROR Caught exception in thread: '_training_0'
Read more >ValueError: could not broadcast input array from shape ...
I have tried to downscale the input volume to 128 and restarted and still the error persists with the refinement. I would appreciate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @mattarderne for confirming it, will work on a patch that solves this issue, it will be pretty straightforward.
I have to specify this better in the docs: Either your images are all of the same size, or you have to resize them to the same size by specifying the
resize_method
,width
andheight
parameters as explained here. Let me know if this solves your issue.