T - data type for outputFalse() outputpublic final class Switch<T> extends PrimitiveOp
If `pred` is true, the `data` input is forwarded to `output_true`. Otherwise, the data goes to `output_false`.
See also `RefSwitch` and `Merge`.
operation| Modifier and Type | Method and Description |
|---|---|
static <T> Switch<T> |
create(Scope scope,
Operand<T> data,
Operand<Boolean> pred)
Factory method to create a class to wrap a new Switch operation to the graph.
|
Output<T> |
outputFalse()
If `pred` is false, data will be forwarded to this output.
|
Output<T> |
outputTrue()
If `pred` is true, data will be forwarded to this output.
|
equals, hashCode, toStringpublic static <T> Switch<T> create(Scope scope, Operand<T> data, Operand<Boolean> pred)
scope - current graph scopedata - The tensor to be forwarded to the appropriate output.pred - A scalar that specifies which output port will receive data.public Output<T> outputFalse()
Copyright © 2015–2019. All rights reserved.