Contents

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

role

What the leaf is for, e.g. "targets".

id

The declared value.

Exceptions

Error

If role was already declared.

bool has(std::string_view role) const noexcept

Whether role was declared.

Parameters

role

What the leaf is for.

Returns

True when it was.

Graph::ValueId at(std::string_view role) const

The value declared for role.

Parameters

role

What the leaf is for.

Returns

Its value id.

Exceptions

Error

If role was not declared; lists what was.

const std::vector< std::pair< std::string, Graph::ValueId > > & all() const noexcept

Every declared leaf, in declaration order.