however, I'm not sure the proper way use StdArrays or equivalent to take an existing byte and turn it into a TString
@killeent , try
TFRecordare basically just protos that coule be read/written directly. You can use these pregenerated bindings to do so
Featureprotos . I am actually looking if there is an API in
tensorflow/javathat does this particular job (TFRecord)
OpenCV(a preprocessed image of a symbol to be "detected") and a loaded model with session and stuff. Maybe there are some open-source examples.
Matobject to be a representation of
Tensor<Float32>and use session runner, like explained in StackOverflow answer. Am I missing something?
TFloat32is a subtype of
Tensorso you need to make one of those. The
SavedModelBundleexposes a call entry point which executes the requested function in the model (e.g. https://github.com/tensorflow/java/blob/35b73ce43cb821e5462ffc9ece51d6528dad224d/tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/SavedModelBundleTest.java#L131).
TFloat32object from my image and pass it to
function.call(..). API says I need 4 dimensional tensor. How it can be made from 2-dimensional array like image?
NDarray.slice(Indices.newaxis(), Indices.ellipse(), Indices.newaxis())on your ndarray. Make sure the width/height order matches your model though. In gneral, if you need to do ndarray operations your best bet is usually to load it into an eager session (
Ops.constantOf) and do it there.
Hi, I have the following
val input = TString.tensorOf(Shape.of(1, 1), DataBuffers.ofObjects(title)) val runner = session.runner() runner.feed("serving_default_text", input) runner.fetch("StatefulPartitionedCall").run()
however, I dont know how I can make predictions in batch, I google for some hints without success. I need to made a matrix ? dataset ? I'm a little lost without too much java documentation. Or it is ok if I reuse the runner and iterate with my inputs ? Thanks