ValueError: could not broadcast input array from shape (224,224,3) into shape (224,224)

前端 未结 6 1472
闹比i
闹比i 2020-11-27 19:23

I have a list say, temp_list with following properties :

len(temp_list) = 9260  
temp_list[0].shape = (224,224,3)  

Now, when I am conver

6条回答
  •  感情败类
    2020-11-27 19:58

    @aravk33 's answer is absolutely correct.

    I was going through the same problem. I had a data set of 2450 images. I just could not figure out why I was facing this issue.

    Check the dimensions of all the images in your training data.

    Add the following snippet while appending your image into your list:

    if image.shape==(1,512,512):
        trainx.append(image)
    

提交回复
热议问题