View source on GitHub |
Computes a safe mean of the losses.
tfm.utils.safe_mean(
losses
)
Args | |
---|---|
losses
|
Tensor whose elements contain individual loss measurements.
|
Returns | |
---|---|
A scalar representing the mean of losses . If num_present is zero,
then zero is returned.
|