shapeOf(_:name:)
Creates a shape-of operation and returns the result tensor.
Declaration
func shapeOf(_ tensor: MPSGraphTensor, name: String?) -> MPSGraphTensorParameters
- tensor:
The input tensor.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor object.
Discussion
Returns a rank-1 tensor of type MPSDataTypeInt32 with the values of the static shape of the input tensor.