ttnn.stack

ttnn.stack() None

Stacks tensors along a new dimension.

:param * input_tensors: List of tensors to stack. :param * dim: Dimension along which to stack.

Example

>>> input_tensor = ttnn.from_torch(torch.randn((2, 2), dtype=torch.bfloat16), device=device)
>>> output = ttnn.stack((input_tensor,input_tensor), 1)