Momentum Evaluation (ME)#
(hivenas.core.nas.momentum_eval)
Calculates and incentivizes the stability of convergence.
- class MomentumAugmentation(monitor='val_sparse_categorical_accuracy')[source]#
Bases:
CallbackCalculates the momentum’s moving average of the parent model
- monitor#
the optimizer metric type to monitor and calculate momentums on
- Type
str
- get_momentum(epoch, acc)[source]#
Calculates the momentums based on the given accuracies and epochs
\[μm(ε) = \frac{αm(ε) − αm(ε − 1)}{αm(ε − 1) − αm(ε − 2)} \quad \forall \; ε \ge 2\]- Parameters
epoch (int) – current epoch
acc (float) – current epoch’s accuracy
- Returns
a tuple consisting of the (current accuracy, current momentum)
- Return type
(float, float)