dtype for the input placeholder
aayux opened this issue · comments
I exported the model serving with export_savedmodel.py and then wrote a Java program for deploying the model on end devices. The main part of the code is as follows:
SavedModelBundle savedModelBundle = SavedModelBundle.load( ... );
Tensor result = savedModelBundle.session().runner()
.feed("input", normalizedImageTensor) // error here
.fetch("predictions")
.run().get(0);
normalizedImageTensor
is the input image loaded and transformed as in __tf_jpeg_process
and then casted to a tensor.
The error pertaining to the commented line is
Exception in thread "main" java.lang.IllegalArgumentException: Expects arg[0] to be string but float is provided
at org.tensorflow.Session.run(Native Method)
at org.tensorflow.Session.access$100(Session.java:48)
at org.tensorflow.Session$Runner.runHelper(Session.java:298)
at org.tensorflow.Session$Runner.run(Session.java:248)
at com.paralleldots.lava.api.main(api.java:59)
This is saying that normalizedImageTensor
is of type string.
What then is the dtype for the input placeholder in your actual graph? What kind of input is expected?