sliceTensor(_:start:sizeTensor:squeezeMask:name:)
Creates a slice operation and returns the result tensor.
Declaration
func sliceTensor(_ tensor: MPSGraphTensor, start startTensor: MPSGraphTensor, sizeTensor: MPSGraphTensor, squeezeMask: UInt32, name: String?) -> MPSGraphTensorParameters
- tensor:
The Tensor to be sliced.
- startTensor:
The tensor that specifies the starting points for each dimension.
- sizeTensor:
The tensor that specifies the size of the result for each dimension.
- squeezeMask:
A bitmask that indicates dimensions the operation will squeeze out from the result.
- name:
The name for the operation.
Return Value
A valid MPSGraphTensor object.
Discussion
Slices a tensor starting from startTensor, stopping short before startTensor + endTensor stepping a single pace between each value. Semantics based on TensorFlow Strided Slice Op.