DatasetOptional

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

boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

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.