flatten2D(_:axis:name:)
Creates a flatten2D operation and returns the result tensor.
Declaration
func flatten2D(_ tensor: MPSGraphTensor, axis: Int, name: String?) -> MPSGraphTensorParameters
- tensor:
The tensor to be flattened.
- axis:
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.