gather(withDimension:source:indices:)
Adds a gather layer to the graph using the source tensor, dimension along which to index, and the indices you specify.
Declaration
func gather(withDimension dimension: Int, source: MLCTensor, indices: MLCTensor) -> MLCTensor?Parameters
- dimension:
The dimension along which to index.
- source:
The source tensor.
- indices:
The index of elements to gather.
Return Value
A gather tensor.