tensorflow / tensorflow/java

How to input data and recive returned results after loading the categorization model

Open
#440 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
928
Forks
227
PR merge metrics
No merged PRs in 30d

Description

dependency:

            <groupId>org.tensorflow</groupId>
            <artifactId>tensorflow-core-platform</artifactId>
            <version>0.4.1</version>
        </dependency>

code:

import org.{tensorflow=>tf}
val result = tf.SavedModelBundle
      .load("D:\\model\\categorization","serve")
      .session()
      .runner()
      .feed("serving_default_inputs:0", tf.create(List("....", "....")))
      .fetch("StatefulPartitionedCall:0")
      .run()
      .get(0);

However, no any create method found within tf, why ??

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tensorflow-core-platform 0.4.1 dependency and the Scala code using SavedModelBundle, session, runner, feed, and fetch. Check the TensorFlow Java API for the supported way to construct the input tensor and retrieve the returned result; done means the loading, input, and output flow is documented for this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala, tensorflow
Domain
machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.