Interface TensorFunction

All Known Implementing Classes:
ConcreteFunction, SessionFunction

public interface TensorFunction
A function that can be called with tensors.
  • Method Details

    • signature

      Signature signature()
      Returns the signature of this function
    • call

      Result call(Map<String,Tensor> arguments)
      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

      default Tensor call(Tensor tensor)
      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)