Method replicate
static member replicate: int -> int64 -> Tensor<'T> -> Tensor<'T>
Repeats the tensor along an axis.
Declaration
static member replicate: ax:int -> reps:int64 -> a:Tensor<'T> -> Tensor<'T>
Parameters
Type | Name | Description |
---|---|---|
int | ax | The axis to repeat along. |
int64 | reps | The number of repetitions. |
Tensor<'T> | a | The tensor to repeat. |
Returns
Type | Description |
---|---|
Tensor<'T> | The repeated tensor. |
Remarks
The contents of a the tensors are replicated reps
times in the specifed dimension.
Examples
let a = HostTensor.zeros [4L; 28L]
let b = Tensor.replicate 0 10L a // b.Shape = [40L; 28L]