powered by
Real
torch_real(self)
(Tensor) the input tensor.
Returns the real part of the input tensor. If input is a real (non-complex) tensor, this function just returns it.
input
Not yet implemented for complex tensors.
$$ \mbox{out}_{i} = real(\mbox{input}_{i}) $$
if (torch_is_installed()) { if (FALSE) { torch_real(torch_tensor(c(-1 + 1i, -2 + 2i, 3 - 3i))) } }
Run the code above in your browser using DataLab