Input data normalization - PyTorch Forums
discuss.pytorch.org › t › input-data-normalizationNov 25, 2019 · Z-score is fine. However, min_max_norm = (data - data.min())/(data.max() - data.min()) For normalisation, the values are squashed in [0, 1]. If you have an outlier say data.max() the transformed values will be very small for min_max_norm(max in denominator) for the majority of samples. Thereby affecting the statistics of your transformed distribution.
torch.nn.functional.normalize — PyTorch 1.10.1 documentation
https://pytorch.org/docs/stable/generated/torch.nn.functional.normalize.htmltorch.nn.functional.normalize — PyTorch 1.10.1 documentation torch.nn.functional.normalize torch.nn.functional.normalize(input, p=2.0, dim=1, eps=1e-12, out=None) [source] Performs L_p Lp normalization of inputs over specified dimension. For a tensor input of sizes (n_0, ..., n_ {dim}, ..., n_k) (n0 ,...,ndim ,...,nk ), each n_ {dim} ndim