isorae dennis
isorae dennis

Reputation: 21

I want to use a trained keras model to make predictions on a handwritten text in an Image

After training, I loaded up my model and passed in the CTC Layer, I downloaded a test Image online and called model.predict(x=image) but I kept getting errors about the image's shape. first image

second image

I then tried to run a reshape function on the image to fit the input layer (128, 32, 1), and I got another error. I'll appreciate any advice on how to run a prediction on a real image, gotten from an API endpoint. Thank you so much.

Below you will find the function I tried to use to reshape functionreshape the image.

And the error I got while reshaping reshape error

Upvotes: 0

Views: 117

Answers (1)

Muhammad Faizan
Muhammad Faizan

Reputation: 100

[![enter image description here][1]][1]

image_size tuple contains three elements but you are receiving two. [1]: https://i.sstatic.net/o34Su.png

Upvotes: 1

Related Questions