Java Inception Client cannot parse image
JoelGooch opened this issue · 3 comments
Hi,
I hit the following error when trying to run the java client for inception example. it's definitely contacting the other end but appears to have problem parsing the incoming jpg image stream. The server end is python running the inception model as per the Tensorflow tutorial @ https://www.tensorflow.org/serving/serving_inception.
Any help is appreciated! Error below:
Start the predict client
Aug 22, 2017 3:04:30 PM io.grpc.internal.ManagedChannelImpl
INFO: [ManagedChannelImpl@d041cf] Created with target 10.1.0.234:9000
Aug 22, 2017 3:04:30 PM com.tobe.InceptionPredictClient do_predict
INFO: Start to convert the image: /Users/joelgooch/Downloads/old_car.jpg
Aug 22, 2017 3:04:33 PM com.tobe.InceptionPredictClient do_predict
WARNING: RPC failed: Status{code=INVALID_ARGUMENT, description=Could not parse example input, value: '????, cause=null}
Aug 22, 2017 3:04:33 PM io.grpc.internal.ManagedChannelImpl maybeTerminateChannel
INFO: [ManagedChannelImpl@d041cf] Terminated
End of predict client
It seems the signature of the inception model has changed and it throws INVALID_ARGUMENT
.
I will have a look when I'm free. Thanks for reporting @JoelGooch
I solved this issue. The Model.proto file is outdated when using the new SavedModelBuilder model exporting method. Using the proto compiler to get the new Model.java file allows access to the .setSignatureName( ) function required to communicate.
Thanks @JoelGooch for your report. I will update the code for the latest model spec.