Method map
val map: 'T -> 'R -> Tensor<'T> -> Tensor<'R>
Applies to specified function to all elements of the tensor.
Declaration
val map: fn:'T -> 'R -> a:Tensor<'T> -> Tensor<'R>
Parameters
| Type | Name | Description |
|---|---|---|
| 'T -> 'R | fn | A function that takes a value from the input tensor and returns the corresponding output value. |
| Tensor<'T> | a | The source tensor. |
Returns
| Type | Description |
|---|---|
| Tensor<'R> | The output tensor. |
Type Parameters
| Name | Description |
|---|---|
| 'T | The type of the data. |
| 'R |