ttnn.polar
- ttnn.polar(input_tensor: ComplexTensor, *, memory_config: ttnn.MemoryConfig | None = None) ttnn.Tensor
-
Perform an polar to Cartesian transformation on
input_tensor
, input_tensor.real(r), input_tensor.imag(theta) into x + i*y generating a complex tensor.- Parameters:
-
input_tensor (ComplexTensor) – the input tensor.
- Keyword Arguments:
-
memory_config (ttnn.MemoryConfig, optional) – Memory config for the operation. Defaults to None.
- Returns:
-
ttnn.Tensor – the output tensor.
Example
>>> tensor = ttnn.to_device(ttnn.from_torch(torch.tensor((0, 1), dtype=torch.bfloat16)), device = device) >>> output = ttnn.polar(tensor)