Contents

reverse(_:axes:name:)

Creates a reverse operation and returns the result tensor.

Declaration

func reverse(_ tensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor

Parameters

  • tensor:

    The tensor to be reversed.

  • axes:

    A tensor that specifies axes to be reversed (Axes must be unique and within normal axis range).

  • name:

    The name for the operation.

Return Value

A valid MPSGraphTensor object.

Discussion

Reverses a tensor on given axes. Semantics based on TensorFlow reverse op.