reverse

Graph.reverse(tensor, axis, *, name=None)

Reverses a tensor along some specified dimensions.

Parameters
  • tensor (np.ndarray or Tensor) – The tensor that you want to reverse.

  • axis (list[int]) – The dimensions along which you want to reverse the tensor.

  • name (str, optional) – The name of the node.

Returns

The reversed tensor.

Return type

Tensor