data.calculate_stats
- data.calculate_stats(dataloader: AtomsLoader, divide_by_atoms: Dict[str, bool], atomref: Dict[str, torch.Tensor] | None = None) Dict[str, Tuple[torch.Tensor, torch.Tensor]] [source]
Use the incremental Welford algorithm described in [h1] to accumulate the mean and standard deviation over a set of samples.
References:
- param dataloader:
data loader
- param divide_by_atoms:
dict from property name to bool: If True, divide property by number of atoms before calculating statistics.
- param atomref:
reference values for single atoms to be removed before calculating stats
- returns:
Mean and standard deviation over all samples