How can I normalize my input data efficiently using a different mean & stddev for each input feature?
Before I used:
transform =transforms.Normalize((single_mean,), (single_std,))
input = transform(torch.tensor(inputs))

in my dataloader. If I change it to
input = np.divide(np.substract(inputs, vector_mean), vector_stddev)
input = torch.tensor(input)

my dataloader becomes slower. Does somebody have a more efficient way to do this? Thanks!
Edit
The reduce in speed was caused by another change in the code. The line
    torch.multiprocessing.set_start_method('spawn')

was added at the same time, which is the reason for the dataloader to slow down.