szaza / tensorflow-example-java

This is a Tensorflow Java example application what uses YOLOv2 model and Gradle for build and dependency management.
Do What The F*ck You Want To Public License
53 stars 31 forks source link

Convert a Tensor with int32 dtype to uint datatype #7

Open shubham0204 opened 5 years ago

shubham0204 commented 5 years ago

I am using TensorFlow Java API to load a pretrained .pb file in Android. The problem is that the model requires its input to have a dtype of uint. But the tensorInferenceInterface.feed() does not allow uint arguments. So I decided to use TF Java and create a image tensor which can be casted to dtype uint from int32. Also, I observed some methods from GraphBuilder like cast which I think could help me out. Could you give me any guidance on this?