Class TensorMap
java.lang.Object
org.tribuo.interop.tensorflow.TensorMap
- All Implemented Interfaces:
AutoCloseable
A map of names and tensors to feed into a session.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
org.tensorflow.Session.Runner
feedInto
(org.tensorflow.Session.Runner runner) Feeds the tensors in this FeedDict into the runner.getMap()
Returns the underlying immutable map.Optional
<org.tensorflow.Tensor> Returns the specified tensor if present.toString()
-
Constructor Details
-
TensorMap
Creates a TensorMap containing the supplied mapping.- Parameters:
inputName
- The input name.value
- The tensor value.
-
TensorMap
-
-
Method Details
-
getMap
-
getTensor
-
feedInto
public org.tensorflow.Session.Runner feedInto(org.tensorflow.Session.Runner runner) Feeds the tensors in this FeedDict into the runner.If the session does not have placeholders with the names used in this TensorMap then the
Session.Runner
will throwIllegalArgumentException
.- Parameters:
runner
- The session runner.- Returns:
- The runner.
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
toString
-