# tensorplay.functional.neg Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.neg.html ```python tensorplay.functional.neg(input, *, out=None) → Tensor ``` Returns a new tensor with the negative of the elements of input. $$\text{out} = -1 \times \text{input}$$ Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. Keyword Arguments: out ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), optional) – the output tensor. Example: ``` >>> a = tensorplay.randn(5) >>> a tensor([ 0.0090, -0.2262, -0.0682, -0.2866, 0.3940]) >>> tensorplay.neg(a) tensor([-0.0090, 0.2262, 0.0682, 0.2866, -0.3940]) ```