flatten2D(_:axisTensor:name:)
Creates a flatten2D operation and returns the result tensor.
Declaration
func flatten2D(_ tensor: MPSGraphTensor, axisTensor: MPSGraphTensor, name: String?) -> MPSGraphTensorParameters
- tensor:
The tensor to be flattened.
- axisTensor:
A scalar tensor that contains the axis around which to flatten.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor object.
Discussion
Flattens dimensions before axis to result[0] and dimensions starting from axis to result[1] and returns a rank-2 tensor as result.