Contents

softmax(alongAxis:)

Computes the softmax of the specified tensor along the specified axis.

Declaration

func softmax(alongAxis axis: Int = -1) -> MLTensor

Parameters

  • axis:

    The axis along which softmax will be computed.

Return Value

A new tensor with the same shape and scalar type.