meter
learning.meter
Meter, updates and stores loss values and report average value.
Meter
Computes and stores the average and current losses by keys
Attributes:
-
meters(dict) –stored loss information by keys
Source code in SaigeToolkit/learning/meter.py
update
update result loss from network
Parameters:
-
loss(Union[Dict[str, float], List[float], float]) –loss to be stored. can be three types of data.
Source code in SaigeToolkit/learning/meter.py
AverageMeter
Computes and stores the average and current value Attributes: val (float): last input loss value avg (float): average loss value sum (float): summed loss value min (float): min loss value max (float): max loss value count (int): total number of loss inputs
update
update single loss value
Parameters:
-
val(float) –current loss value
-
n(int, default:1) –current number of loss inputs. Defaults to 1.
Source code in SaigeToolkit/learning/meter.py
get_meter
get loss/score average meter for training and validation
Returns: