ValueError Error when checking input expected conv2d_1_input to have shape 3 10 1 but got array with shape 3 1 1
This error is raised because the input shape of the model is expected to be (3, 10, 1) but the actual input provided has a different shape of (3, 1, 1).
The first dimension of the input shape (3) represents the number of color channels in the image. The second dimension (10) represents the width of the image, and the third dimension (1) represents the height of the image.
To resolve this error, you need to reshape your input data to match the expected input shape of the model. You can use the numpy reshape function to do this.
For example, if your input data is stored in a numpy array called X, you can reshape it to the expected input shape by calling:
X = X.reshape((3, 10, 1))
This will reshape the input data to have 3 color channels, a width of 10, and a height of 1, which matches the expected input shape of the model.
原文地址: https://www.cveoy.top/t/topic/Dpt 著作权归作者所有。请勿转载和采集!