Operands

Stay organized with collections Save and categorize content based on your preferences.
public final class Operands

Utilities for manipulating operand related types and lists.

Public Methods

static Output[]<?>
asOutputs(Iterable<? extends Operand<?>> inputs)
Converts a list of Operand into an array of Output.
static <T extends TType> DataType
toDataType(Class<? extends T> type)
Converts a tensor type class to a DataType attribute.
static <T extends TType> DataType[]
toDataTypes(Collection<Class<? extends T>> types)
Converts a list of tensor type classes to an array of DataType attributes.

Inherited Methods

Public Methods

public static Output[]<?> asOutputs (Iterable<? extends Operand<?>> inputs)

Converts a list of Operand into an array of Output.

Operation wrappers need to convert back a list of inputs into an array of outputs in order to build an operation, see addInputList(Output[]).

Parameters
inputs an iteration of input operands
Returns
  • an array of outputs

public static DataType toDataType (Class<? extends T> type)

Converts a tensor type class to a DataType attribute.

Parameters
type tensor type class
Returns
  • data type

public static DataType[] toDataTypes (Collection<Class<? extends T>> types)

Converts a list of tensor type classes to an array of DataType attributes.

Parameters
types tensor type classes
Returns
  • an array of data types