before training a network, I normalize each input sequence, by having this function,

def norm(x):
    return (x - np.mean(x)) / (np.std(x) + 1e-7)


Here, datamatrix[row_id,:] represents a single input sequence. For each normalization operation, I plot the following figure, where the dashed line represented the normalized sequence, while the solid line represents the original sequence. It seems that the normalization operation even enlarges the range of original sequence, i.e., the max and min

enter image description here


1 Answer 1


Your original vector/sequence seems to have a mean 0 and standard deviation less than 1 mainly because the starting region and the ending region are more or less zero. So it doesn't seem to be surprising that the scaled vector has bigger elements - you are dividing all of them by a number smaller than 1.

Try printing the statistics yourself and see

print(x.mean(), x.std())

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.