MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / reverse

Function reverse

tensorflow/python/keras/backend.py:3121–3134  ·  view source on GitHub ↗

Reverse a tensor along the specified axes. Arguments: x: Tensor to reverse. axes: Integer or iterable of integers. Axes to reverse. Returns: A tensor.

(x, axes)

Source from the content-addressed store, hash-verified

3119
3120@keras_export('keras.backend.reverse')
3121def reverse(x, axes):
3122 """Reverse a tensor along the specified axes.
3123
3124 Arguments:
3125 x: Tensor to reverse.
3126 axes: Integer or iterable of integers.
3127 Axes to reverse.
3128
3129 Returns:
3130 A tensor.
3131 """
3132 if isinstance(axes, int):
3133 axes = [axes]
3134 return array_ops.reverse(x, axes)
3135
3136
3137# VALUE MANIPULATION

Callers 15

AppendNodesFunction · 0.85
ExtractStackFunction · 0.85
rnnFunction · 0.85
get_top_nFunction · 0.85
BuildArrayTreeFunction · 0.85
ReverseIndicesMethod · 0.85
LabelSeqMethod · 0.85
GetNameFromLocFunction · 0.85
runOnFunctionMethod · 0.85

Calls 1

reverseMethod · 0.45

Tested by 4

XLA_TEST_FFunction · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68