Interface TensorFunction
- All Known Implementing Classes:
ConcreteFunction, SessionFunction
public interface TensorFunction
A function that can be called with tensors.
-
Method Summary
Modifier and TypeMethodDescriptionInvokes a function using the default eager session.default TensorInvokes a function with a single input and output using the default eager session.Returns the signature of this functionstatic Operand<?> validateDescription(Signature.TensorDescription description, Graph graph, String name, String prefix)
-
Method Details
-
signature
Signature signature()Returns the signature of this function -
call
Invokes a function using the default eager session.Caller is responsible for close the result object.
- Parameters:
arguments- list of tensors to pass in input to the function, mapped by their signature name- Returns:
- output tensors resulting from the execution of the function, mapped by their signature name
- Throws:
IllegalArgumentException- if the passed arguments don't match up to the function's parameters.
-
call
Invokes a function with a single input and output using the default eager session.Caller is responsible for closing all Tensors.
- Parameters:
tensor- input tensor- Returns:
- output tensor
- Throws:
IllegalArgumentException- if there are multiple input or output parameters defined in the function
-
validateDescription
static Operand<?> validateDescription(Signature.TensorDescription description, Graph graph, String name, String prefix)
-