DatasetOptional

Stay organized with collections Save and categorize content based on your preferences.
public class DatasetOptional
Known Direct Subclasses

An optional represents the result of a dataset getNext operation that may fail, when the end of the dataset has been reached.

Public Constructors

DatasetOptional(Ops tf, Operand<?> optionalVariant, List<Class<? extends TType>> outputTypes, List<Shape> outputShapes)

Public Methods

static DatasetOptional
fromComponents(Ops tf, List<Operand<?>> components, List<Class<? extends TType>> outputTypes, List<Shape> outputShapes)
Ops
Operand<?>
List<Operand<?>>
getValue()
Returns the value of the dataset element represented by this optional, if it exists.
Operand<TBool>
hasValue()
Whether this optional has a value.

Inherited Methods

Public Constructors

public DatasetOptional (Ops tf, Operand<?> optionalVariant, List<Class<? extends TType>> outputTypes, List<Shape> outputShapes)

Public Methods

public static DatasetOptional fromComponents (Ops tf, List<Operand<?>> components, List<Class<? extends TType>> outputTypes, List<Shape> outputShapes)

public Ops getOpsInstance ()

public Operand<?> getOptionalVariant ()

public List<Operand<?>> getValue ()

Returns the value of the dataset element represented by this optional, if it exists.

public Operand<TBool> hasValue ()

Whether this optional has a value.