Transformer Implementation

This commit is contained in:
Si11ium
2020-10-29 16:40:43 +01:00
parent f296ba78b9
commit 13812b83b5
5 changed files with 167 additions and 66 deletions

View File

@ -52,7 +52,7 @@ class NormalizeLocal(object):
std = x.std() + 0.0001
# Pytorch Version:
# x = x.__sub__(mean).__div__(std)
# tensor = tensor.__sub__(mean).__div__(std)
# Numpy Version
x = (x - mean) / std
x[np.isnan(x)] = 0