ksuit.utils.training.running_stats ================================== .. py:module:: ksuit.utils.training.running_stats Classes ------- .. autoapisummary:: ksuit.utils.training.running_stats.RunningStats Module Contents --------------- .. py:class:: RunningStats(name = None) Calculates statistics of data (min, max, mean and variance) for data normalization purposes. .. py:attribute:: name :value: None .. py:method:: push_tensor(x, dim = 1) Add a tensor to the statistics. Calculations are carried out in float64 to avoid numerical imprecision. :param x: Tensor with data. :param dim: Which dim (i.e., axis) contains the feature dimension. For example, in a point cloud with shape (num_points, 3) dim=1 calculates the stats of the x, y and z positions. In an RGB image with shape (batch_size, num_channels, height, width), dim=1 calculates the per-channel statistics. .. py:property:: min :type: torch.Tensor .. py:property:: max :type: torch.Tensor .. py:property:: mean :type: torch.Tensor .. py:property:: var :type: torch.Tensor .. py:property:: std :type: torch.Tensor .. py:property:: logmean :type: torch.Tensor .. py:property:: logvar :type: torch.Tensor .. py:property:: logstd :type: torch.Tensor