ttnn.repeat
- ttnn.repeat = Operation(python_fully_qualified_name='ttnn.repeat', function=<ttnn._ttnn.operations.data_movement.repeat_t object>, preprocess_golden_function_inputs=<function default_preprocess_golden_function_inputs>, golden_function=<function _golden_function>, postprocess_golden_function_outputs=<function default_postprocess_golden_function_outputs>, is_cpp_operation=True, is_experimental=False)
-
Returns a new tensor filled with repetition of input
input_tensor
according to number of times specified inshape
.- Parameters:
-
input_tensor (ttnn.Tensor) – the input tensor.
repetition_vector (SmallVector) – The number of repetitions for each dimension.
- Keyword Arguments:
-
memory_config (ttnn.MemoryConfig, optional) – Memory configuration for the operation. Defaults to None.
- Returns:
-
ttnn.Tensor – the output tensor.
Example
>>> tensor = ttnn.repeat(ttnn.from_torch(torch.tensor([[1, 2], [3, 4]]), [1,2],)), device) >>> print(tensor) tensor([[1, 2], [1, 2], [3, 4], [3, 4]])