Class TensorChannel.Instance
java.lang.Object
org.apache.wayang.core.util.AbstractReferenceCountable
org.apache.wayang.core.platform.ExecutionResourceTemplate
org.apache.wayang.core.platform.AbstractChannelInstance
org.apache.wayang.tensorflow.channels.TensorChannel.Instance
- All Implemented Interfaces:
ChannelInstance,ExecutionResource,ReferenceCountable
- Enclosing class:
- TensorChannel
ChannelInstance implementation for TensorChannels.-
Constructor Summary
ConstructorsConstructorDescriptionInstance(TensorflowExecutor executor, OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.tensorflow.ndarray.NdArray<?> tensor) protected voidPerforms the actual disposing work of this instance.Optionally provides the measured cardinality of this instance.<T extends org.tensorflow.ndarray.NdArray<?>>
TMethods inherited from class org.apache.wayang.core.platform.AbstractChannelInstance
getLineage, getProducerOperatorContext, markProduced, setMeasuredCardinality, toString, wasProducedMethods inherited from class org.apache.wayang.core.platform.ExecutionResourceTemplate
dispose, disposeUnreferencedMethods inherited from class org.apache.wayang.core.util.AbstractReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.wayang.core.platform.ChannelInstance
isMarkedForInstrumentationMethods inherited from interface org.apache.wayang.core.platform.ExecutionResource
disposeMethods inherited from interface org.apache.wayang.core.util.ReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReference
-
Constructor Details
-
Instance
public Instance(TensorflowExecutor executor, OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex)
-
-
Method Details
-
accept
public void accept(org.tensorflow.ndarray.NdArray<?> tensor) -
provideTensor
public <T extends org.tensorflow.ndarray.NdArray<?>> T provideTensor() -
getChannel
- Returns:
- the
Channelthat is implemented by this instance
-
getMeasuredCardinality
Description copied from interface:ChannelInstanceOptionally provides the measured cardinality of this instance. However, such a cardinality might not be available for several reasons. For instance, the measurement might not have been requested or could not be implemented by the executingPlatform.- Specified by:
getMeasuredCardinalityin interfaceChannelInstance- Overrides:
getMeasuredCardinalityin classAbstractChannelInstance- Returns:
- the measured cardinality if available
-
doDispose
Description copied from class:ExecutionResourceTemplatePerforms the actual disposing work of this instance.- Specified by:
doDisposein classExecutionResourceTemplate- Throws:
Throwable- in case anything goes wrong
-