0

I'm using this example.

when run all as untouched all works fine, but now I want to make a test of a single file, I'm doing it in this mode:

image = encode_img('new_image/x3fwf.png') image = image['image'] image.shape // TensorShape([200, 50, 1]) prediction_model.predict(image) 

so here i get back:

ValueError: Negative dimension size caused by subtracting 2 from 1 for '{{node functional_13/pool1/MaxPool}} = MaxPoolT=DT_FLOAT, data_format="NHWC", ksize=[1, 2, 2, 1], padding="VALID", strides=[1, 2, 2, 1]' with input shapes: [?,50,1,32].

I know I am doing something wrong, but not understand what

1 Answer 1

2

Try to add a dimension to it so that it can be called in a batch mode ([1,200,50,1])

You can use for an array,

image = np.expand_dims(image, axis=0) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.