mdietrichstein / tensorflow-open_nsfw

Tensorflow Implementation of Yahoo's Open NSFW Model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tensorflow Serving Issue

delta9 opened this issue · comments

Hi,

Thanks so much for this repository, I think you're doing a great service by saving everybody a lot of time!

Did you successfully deploy the model on Tensorflow Serving? I've exported it using your tool but I keep getting an error message when trying to test it:

{ code: 3, details: 'Invalid character found in base64.\n\t [[Node: map/while/DecodeBase64 = DecodeBase64[_output_shapes=[[]], _device="/job:localhost/replica:0/task:0/cpu:0"](map/while/TensorArrayReadV3)]]', metadata: Metadata { _internal_repr: {} } }

My client code is here: https://github.com/delta9/tensorflow-serving-node-client

I've setup a test server reachable on: 192.99.0.117:9000

I assume it's an issue with the client (it works fine on Google Cloud ML-Engine) but I've sort of hit a road block here and would really appreciate it, if you have any advice.

Many thanks,

Melvin

Hey,

Thanks so much for this repository, I think you're doing a great service by saving everybody a lot of time!

Thanks! It's always nice to get some feedback.

Did you successfully deploy the model on Tensorflow Serving?

No, haven't had a chance yet. I was under the impression that it should work just like on ML-Engine.

The error sounds familiar though. Happened to me when I was using the wrong base64 encoding. Try using a different base64 encoder (urlsafe versus standard/non-urlsafe) and see if it helps.

Ah so after going through the code, it turns out it's actually really easy to solve the issue by simply not trying to decode the input - took me a while to figure that out but then again, I've never used Python or TensorFlow before 😂

https://github.com/delta9/tensorflow-open_nsfw/commit/1b9b8849ae3d76bdcc62bcc009825e1273747935

hi @delta9 I know this is an old, closed issue, but I am getting exactly this error message!
and I can't find any examples discussing it.

So how exactly did u fix it? what do u mean 'not trying to decode the input' ?

Thanks