fn
resolve_neg
→Tensorresolve_neg(x: Tensor)Materialise any pending lazy negation — no-op in Lucid.
Reference frameworks that maintain a lazy-negation flag use this op
to force the flag to be applied to the underlying buffer. Lucid has
no such flag (see is_neg), so this returns the input
unchanged.
Parameters
xTensorInput tensor.
Returns
TensorThe input x, returned unchanged.
Notes
Equivalent to the identity map:
Provided strictly for API parity. Calling this op is free — no copy is made, no autograd node is inserted.
Examples
>>> import lucid
>>> x = lucid.tensor([1.0, 2.0])
>>> lucid.resolve_neg(x) is x
True