class
SushiAI::Train::ObjectiveLeaves
The graph values an objective declared, by role.
- Declared in
include/SushiAI/train/objective.hpp
For cross-entropy that is one [N, C] target leaf; for a PINN it would be the collocation points. It is what StepSpec::targets generalises into.
Public member functions
void add(std::string_view role, Graph::ValueId id)Records that role is id.
Parameters
roleWhat the leaf is for, e.g. "targets".
idThe declared value.
Exceptions
ErrorIf
rolewas already declared.
bool has(std::string_view role) const noexceptWhether role was declared.
Parameters
roleWhat the leaf is for.
Returns
True when it was.
Graph::ValueId at(std::string_view role) constThe value declared for role.
Parameters
roleWhat the leaf is for.
Returns
Its value id.
Exceptions
ErrorIf
rolewas not declared; lists what was.
const std::vector< std::pair< std::string, Graph::ValueId > > & all() const noexceptEvery declared leaf, in declaration order.

