Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Optimizers/OptimizerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1105,9 +1105,9 @@ protected virtual void DeserializeAdditionalData(BinaryReader reader)
public virtual void Step()
{
throw new NotImplementedException(
"Step() method is not implemented for this optimizer type. " +
"This optimizer may be a non-gradient-based optimizer that uses the Optimize() method instead, " +
"or the derived class needs to implement the Step() method.");
$"The 'Step()' method is not implemented for optimizer type '{GetType().Name}'. " +
"For gradient-based optimizers, this method must be overridden by the derived class. " +
"For non-gradient-based optimizers, consider using the 'Optimize()' method instead.");
}

/// <summary>
Expand All @@ -1118,9 +1118,9 @@ public virtual void Step()
public virtual Dictionary<string, Vector<T>> CalculateUpdate(Dictionary<string, Vector<T>> gradients)
{
throw new NotImplementedException(
"CalculateUpdate() method is not implemented for this optimizer type. " +
"This optimizer may be a non-gradient-based optimizer that uses the Optimize() method instead, " +
"or the derived class needs to implement the CalculateUpdate() method.");
$"The 'CalculateUpdate()' method is not implemented for optimizer type '{GetType().Name}'. " +
"For gradient-based optimizers, this method must be overridden by the derived class. " +
"For non-gradient-based optimizers, consider using the 'Optimize()' method instead.");
}

/// <summary>
Expand Down
Loading