Closed sxs4337 closed 2 years ago
I am trying to run analyze on a sample image (256x256, png).
analyze
I encounter this error- ValueError: Negative dimension size caused by subtracting 2 from 1 for '{{node max_pooling2d_1/MaxPool}} = MaxPool[T=DT_FLOAT, data_format="NCHW", explicit_paddings=[], ksize=[1, 1, 2, 2], padding="VALID", strides=[1, 1, 2, 2]](Placeholder)' with input shapes: [?,128,112,1].
ValueError: Negative dimension size caused by subtracting 2 from 1 for '{{node max_pooling2d_1/MaxPool}} = MaxPool[T=DT_FLOAT, data_format="NCHW", explicit_paddings=[], ksize=[1, 1, 2, 2], padding="VALID", strides=[1, 1, 2, 2]](Placeholder)' with input shapes: [?,128,112,1].
This seem to happen in the model_build call. Any tips on this error?
model_build
I am using- deepface 0.0.68 tensorflow 2.6.2 opencv-python 4.5.4.60
It turns out this was a channels order issue. I had to change keras config to channels_last and it works now. Thanks.
channels_last
I am trying to run
analyze
on a sample image (256x256, png).I encounter this error-
ValueError: Negative dimension size caused by subtracting 2 from 1 for '{{node max_pooling2d_1/MaxPool}} = MaxPool[T=DT_FLOAT, data_format="NCHW", explicit_paddings=[], ksize=[1, 1, 2, 2], padding="VALID", strides=[1, 1, 2, 2]](Placeholder)' with input shapes: [?,128,112,1].
This seem to happen in the
model_build
call. Any tips on this error?I am using- deepface 0.0.68 tensorflow 2.6.2 opencv-python 4.5.4.60