sciwing.meters¶
loss_meter¶
-
class
sciwing.meters.loss_meter.LossMeter¶ Bases:
object-
add_loss(avg_batch_loss: float, num_instances: int) → None¶ Adds the average batch loss and the num of instances in that batch to that loss
Parameters: - avg_batch_loss (float) – Average batch loss
- num_instances (int) – Number of instances from the batch
-
get_average() → float¶ Returns the average loss over all the batches at this point in time
Returns: Average loss Return type: float
-
reset()¶ Resets all the losses and batch sizes that are accumulated
-