ttnn.imag_bw

ttnn.imag_bw = Operation(python_fully_qualified_name='ttnn.imag_bw', function=<ttnn._ttnn.operations.complex_unary_backward.imag_bw_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)

Performs backward operations for complex imaginary function on input_tensor with given grad_tensor.

Parameters:
  • grad_tensor (ttnn.Tensor) – the input tensor.

  • input_tensor (ComplexTensor) – the input tensor.

Keyword Arguments:

memory_config (ttnn.MemoryConfig) – Memory configuration for the operation.

Returns:

List of ttnn.Tensor – the output tensor.

Note:

Example

>>> grad_tensor = ttnn.to_device(ttnn.from_torch(torch.tensor((1, 2), dtype=torch.bfloat16)), device=device)
>>> tensor = ttnn.to_device(ttnn.from_torch(torch.tensor((1, 2), dtype=torch.bfloat16)), device=device)
>>> output = ttnn.imag_bw(grad_tensor, tensor)