TensorFlow Error: Incompatible Input Shape for 'sequential_3' Layer
This error message indicates that the input shape of the first layer in the 'sequential_3' model doesn't match the expected shape. The model expects input images with a height and width of 150 pixels and 3 color channels (RGB) – (None, 150, 150, 3). However, the actual input shape is (None, 128, 128, 3), meaning the input images have a height and width of 128 pixels instead of 150.
To resolve this, you need to resize the input images to 150x150 pixels before feeding them to the model. You can use image processing libraries like OpenCV or Pillow for resizing. Alternatively, adjust the model architecture to accept 128x128 pixel inputs instead of 150x150.
原文地址: https://www.cveoy.top/t/topic/oskj 著作权归作者所有。请勿转载和采集!