NotJoeMartinez / APDL_Quality_Control

Computer Vision Quality control for the Advanced Particle Detector Laboratory at Texas Tech University
0 stars 1 forks source link

ValueError: Negative dimension size caused by subtracting 3 from 1 #20

Closed NotJoeMartinez closed 3 years ago

NotJoeMartinez commented 3 years ago

When running test_model on trained by jorden net I'm getting this error.

    ValueError: Negative dimension size caused by subtracting 3 from 1 for '{{node sequential/max_pooling2d_7/MaxPool}} = MaxPool[T=DT_FLOAT, data_format="NHWC", explicit_paddings=[], ksize=[1, 3, 3, 1], padding="VALID", strides=[1, 3, 3, 1]](sequential/conv2d_14/Relu)' with input shapes: [?,1,1,64].
NotJoeMartinez commented 3 years ago

This is caused by the input shape not matching the one it's trained on and can be fixed by changing the shape values. This will be fixed in #21 by making the input shape dynamic.

size = (480, 480)
data = np.ndarray(shape=(1, 480, 480, 3), dtype=np.float32)