Maxpool 2D layer error `Negative dimension size caused by subtracting 2 from 1 input shape shape=(128, 128, 1, 16)`
shreya-ibind opened this issue · 0 comments
shreya-ibind commented
Im trying to convert tensorflow model to onnx.
I have attached my python file.
Error
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer 'max_pooling2d' (type MaxPooling2D).
Negative dimension size caused by subtracting 2 from 1 for '{{node model/max_pooling2d/MaxPool}} = MaxPool[T=DT_FLOAT, data_format="NHWC", explicit_paddings=[], ksize=[1, 2, 2, 1], padding="VALID", strides=[1, 2, 2, 1]](model/leaky_re_lu_1/LeakyRelu)' with input shapes: [128,128,1,16].
Call arguments received by layer 'max_pooling2d' (type MaxPooling2D):
• inputs=tf.Tensor(shape=(128, 128, 1, 16), dtype=float32)
steps to reproduce
- Run the py file attached
python case_unet.py
case_unet.zip