How to normalize the data that is not image?

The data I use is one-dimensional vector, I can’t normalize it by ‘.ToTensor()’ in ‘torchvision.transforms’, what should I do?

Normalization can mean different things. Normalizing with mean=0 and std=1, you do by

x = (x - x.mean()) / x.std()

In case you want to normalize between [0, 1]

x = (x - x.min())(x.max() - x.min())

Also, torchvision transforms are more oriented towards images. Maybe you can provide the code and I can help for your specific code.

I got it, thank you!