Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model does not work , output is alway the same! not change #29

Closed
Johnson-yue opened this issue Sep 12, 2018 · 3 comments
Closed

Model does not work , output is alway the same! not change #29

Johnson-yue opened this issue Sep 12, 2018 · 3 comments

Comments

@Johnson-yue
Copy link

Johnson-yue commented Sep 12, 2018

Hi, I update your docker image and test my model which saved by SavedModel function. my model just is resnet_50 for classification, when I saved model as SavedModel format, the result did not change whether I changed any input picture ???

My Model have problem? what is wrong with my model or some reason?

Here is my saved model code :
image

image

First, I build a resnet_50 compute graph ,
and then I reload graph and restore weights from checkpoint.
Finally, I use tf.saved_model to save and everything is ok. I have no error or trouble.

I write client code for it , here:
image
In client code , first I read a image into numpy.array,
then convert data of image to [1, 64, 64 ,3] dtype=float32, and convert numpy to list .
Finally, send a requests like code and show all result.

the result is always is:
image

image

@tobegit3hub
Copy link
Owner

It seems to be the problem of the model. Can you try run inference in your python script? For example, you can load the checkpoint and run sess.run() with your test data and print the result.

@Johnson-yue
Copy link
Author

@tobegit3hub thanks for your reply, it is my mistakes. I check the input data. it is the same. I think the reason is opencv2 and opencv3 difference!. When I use opencv3 python api, the result is correct! Thank you

@tobegit3hub
Copy link
Owner

You are welcome. Thanks for your report 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants