normalize¶
dragon.vm.torch.nn.functional.
normalize
(
input,
p=2,
dim=1,
end_dim=None,
eps=1e-12,
out=None
)[source]¶Apply the normalization to the input.
The normalization is defined as:
- Parameters:
- input (dragon.vm.torch.Tensor) – The input tensor.
- p (int, optional, default=2) – The exponent of norm.
- dim (int, optional, default=1) – The first dimension to reduce.
- end_dim (int, optional) – The last dimension to reduce.
- eps (float, optional, default=1e-12) – The value to .
- out (dragon.vm.torch.Tensor, optional) – The output tensor.
- Returns:
dragon.vm.torch.Tensor – The output tensor.