@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.Reverse extends Pointer
tf.reverse has now changed behavior in preparation for 1.0.
tf.reverse_v2 is currently an alias that will be deprecated before TF 1.0.
Given a tensor, and a int32 tensor axis representing the set of
dimensions of tensor to reverse. This operation reverses each dimension
i for which there exists j s.t. axis[j] == i.
tensor can have up to 8 dimensions. The number of dimensions specified
in axis may be 0 or more entries. If an index is specified more than
once, a InvalidArgument error is raised.
For example:
# tensor 't' is [[[[ 0, 1, 2, 3],
# [ 4, 5, 6, 7],
# [ 8, 9, 10, 11]],
# [[12, 13, 14, 15],
# [16, 17, 18, 19],
# [20, 21, 22, 23]]]]
# tensor 't' shape is [1, 2, 3, 4]
# 'dims' is [3] or 'dims' is [-1]
reverse(t, dims) ==> [[[[ 3, 2, 1, 0],
[ 7, 6, 5, 4],
[ 11, 10, 9, 8]],
[[15, 14, 13, 12],
[19, 18, 17, 16],
[23, 22, 21, 20]]]]
# 'dims' is '[1]' (or 'dims' is '[-3]')
reverse(t, dims) ==> [[[[12, 13, 14, 15],
[16, 17, 18, 19],
[20, 21, 22, 23]
[[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11]]]]
# 'dims' is '[2]' (or 'dims' is '[-2]')
reverse(t, dims) ==> [[[[8, 9, 10, 11],
[4, 5, 6, 7],
[0, 1, 2, 3]]
[[20, 21, 22, 23],
[16, 17, 18, 19],
[12, 13, 14, 15]]]]
Arguments:
* scope: A Scope object
* tensor: Up to 8-D.
* axis: 1-D. The indices of the dimensions to reverse. Must be in the range
[-rank(tensor), rank(tensor)).
Returns:
* Output: The same shape as tensor.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
Reverse(Pointer p)
Pointer cast constructor.
|
Reverse(tensorflow.Scope scope,
tensorflow.Input tensor,
tensorflow.Input axis) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Node |
node() |
tensorflow.Operation |
operation() |
tensorflow.Reverse |
operation(tensorflow.Operation operation) |
tensorflow.Output |
output() |
tensorflow.Reverse |
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 Reverse(Pointer p)
Pointer.Pointer(Pointer).public Reverse(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input tensor, @ByVal tensorflow.Input axis)
@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.Reverse operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output output()
public tensorflow.Reverse output(tensorflow.Output output)
Copyright © 2019. All rights reserved.