oa::Parameter

oa::Parameter — named trainable tensor with live gradient access.

Public Methods

Matrix & oa::Parameter::grad()
Matrix oa::Parameter::grad()

Public Data Members

dataMatrixfield
nameStringfield
requiresGradboolfield

Public Method Documentation

Matrix & oa::Parameter::grad()
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.

Matrix oa::Parameter::grad()
No public source comment is attached to this declaration.

Returns

Matrix

The declared return value.