Normalize 3D Tensor

Hello gsouza7,

You need to take the maximum along the first dimension, like so:

x = torch.randn(10, 20, 30)
x_max = x.max(dim=0).values
x_normalized = x / x_max
1 Like