Input 0 Of Layer Max_pooling2d Is Incompatible With The Layer: Expected Ndim=4, Found Ndim=5. Full Shape Received: [none, 4, 10, 8, 32]
When I try to define my model, I get the following error message: Input 0 of layer max_pooling2d is incompatible with the layer: expected ndim=4, found ndim=5. Full shape receive
Solution 1:
Input Layer is either expects data in the format of NHWC or NCHW.
N = Number of samples
H = Height of the Image
W = Width of the Image
C = Number of Channels
In most cases, N keeps varying so N is given as None. Based on your example, you can provide input shape and to convert between NHWC and NCHW you give input parameter as data_format=‘channel_first’ or data_format=‘channel_last’
Post a Comment for "Input 0 Of Layer Max_pooling2d Is Incompatible With The Layer: Expected Ndim=4, Found Ndim=5. Full Shape Received: [none, 4, 10, 8, 32]"