torch.copysign
torch.copysign(input, other, *, out=None) -> Tensor
Create a new floating-point tensor with the magnitude of "input"
   and the sign of "other", elementwise.
  \text{out}_{i} = \begin{cases}     -|\text{input}_{i}| &
  \text{if } \text{other}_{i} \leq -0.0 \\      |\text{input}_{i}|
  & \text{if } \text{other}_{i} \geq 0.0 \\ \end{cases}

Supports broadcasting to a common shape, and integer and float
   inputs.
Parameters:
      * input (Tensor) -- magnitudes.
  * **other** (*Tensor** or **Number*) -- contains value(s) whose
    signbit(s) are applied to the magnitudes in "input".

Keyword Arguments:
      out (Tensor, optional) -- the output tensor.
Example:
  >>> a = torch.randn(5)
  >>> a
  tensor([-1.2557, -0.0026, -0.5387,  0.4740, -0.9244])
  >>> torch.copysign(a, 1)
  tensor([1.2557, 0.0026, 0.5387, 0.4740, 0.9244])
  >>> a = torch.randn(4, 4)
  >>> a
