* Add project code * Logger improvements * Improvements to web demo code * added create_wlasl_landmarks_dataset.py and xtract_mediapipe_landmarks.py * Fix rotation augmentation * fixed error in docstring, and removed unnecessary replace -1 -> 0 * Readme updates * Share base notebooks * Add notebooks and unify for different datasets * requirements update * fixes * Make evaluate more deterministic * Allow training with clearml * refactor preprocessing and apply linter * Minor fixes * Minor notebook tweaks * Readme updates * Fix PR comments * Remove unneeded code * Add banner to Readme --------- Co-authored-by: Gabriel Lema <gabriel.lema@xmartlabs.com>
19 lines
395 B
Python
19 lines
395 B
Python
|
|
import torch
|
|
|
|
|
|
class GaussianNoise(object):
|
|
def __init__(self, mean=0., std=1.):
|
|
self.std = std
|
|
self.mean = mean
|
|
|
|
def __call__(self, tensor):
|
|
return tensor + torch.randn(tensor.size()) * self.std + self.mean
|
|
|
|
def __repr__(self):
|
|
return self.__class__.__name__ + '(mean={0}, std={1})'.format(self.mean, self.std)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
pass
|