oa::Parameter
oa::Parameter — named trainable tensor with live gradient access.
Public Methods
Public Data Members
dataMatrixfieldnameStringfieldrequiresGradboolfieldPublic Method Documentation
Gradient — SINGLE SOURCE OF TRUTH. The grad buffer is owned by data's autograd meta (allocated lazily by setRequiresGrad / accumulateGrad). grad() resolves to that live buffer every call, so it can never be a stale snapshot. - non-const grad() → mutable lvalue ref to the live grad (fill / assign / & ). - const grad() → by-value handle sharing the live buffer (read-only).
Returns
Matrix &The declared return value.
No public source comment is attached to this declaration.
Returns
MatrixThe declared return value.