ValueError: could not broadcast input array from shape (307,717,3) into shape (400,1000,3) when cropping an image with Tensorflow
I have a bunch of spectograms that I want to feed into a CNN. All the images have a height of 400 and a width of 1000 and look like this:
spectogram
I only want to feed the actual spectogram and not the white parts or the axis description to the CNN so I thought i crop it using the preprocess funtion of the keras ImageDataGenerator.