@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.Where3 extends Pointer
x or y, depending on condition.
The x, and y tensors must all have the same shape, and the
output will also have that shape.
The condition tensor must be a scalar if x and y are scalars.
If x and y are vectors or higher rank, then condition must be either a
scalar, a vector with size matching the first dimension of x, or must have
the same shape as x.
The condition tensor acts as a mask that chooses, based on the value at each
element, whether the corresponding element / row in the output should be
taken from x (if true) or y (if false).
If condition is a vector and x and y are higher rank matrices, then
it chooses which row (outer dimension) to copy from x and y.
If condition has the same shape as x and y, then it chooses which
element to copy from x and y.
For example:
python
# 'condition' tensor is [[True, False]
# [False, True]]
# 't' is [[1, 2],
# [3, 4]]
# 'e' is [[5, 6],
# [7, 8]]
select(condition, t, e) # => [[1, 6], [7, 4]]
# 'condition' tensor is [True, False]
# 't' is [[1, 2],
# [3, 4]]
# 'e' is [[5, 6],
# [7, 8]]
select(condition, t, e) ==> [[1, 2],
[7, 8]]
Arguments:
* scope: A Scope object
* x: = A Tensor which may have the same shape as condition.
If condition is rank 1, x may have higher rank,
but its first dimension must match the size of condition.
* y: = A Tensor with the same type and shape as x.
Returns:
* Output: = A Tensor with the same type and shape as x and y.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
Where3(Pointer p)
Pointer cast constructor.
|
Where3(tensorflow.Scope scope,
tensorflow.Input condition,
tensorflow.Input x,
tensorflow.Input y) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Node |
node() |
tensorflow.Operation |
operation() |
tensorflow.Where3 |
operation(tensorflow.Operation operation) |
tensorflow.Output |
output() |
tensorflow.Where3 |
output(tensorflow.Output output) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic Where3(Pointer p)
Pointer.Pointer(Pointer).public Where3(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input condition, @ByVal tensorflow.Input x, @ByVal tensorflow.Input y)
@ByVal @Name(value="operator tensorflow::Output") public tensorflow.Output asOutput()
@ByVal @Name(value="operator tensorflow::Input") public tensorflow.Input asInput()
public tensorflow.Node node()
@ByRef public tensorflow.Operation operation()
public tensorflow.Where3 operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output output()
public tensorflow.Where3 output(tensorflow.Output output)
Copyright © 2019. All rights reserved.