diff --git a/experiment1/modules.py b/experiment1/modules.py index 8ff38ec..739e3ce 100644 --- a/experiment1/modules.py +++ b/experiment1/modules.py @@ -8,8 +8,7 @@ def __init__(self) -> None: def __call__(self, X: T.Tensor) -> T.Tensor: """Calling the adding operation without gradient""" - with T.no_grad(): - return X[0] + X[1] + return X[0] + X[1] class Substracter(object): @@ -19,8 +18,7 @@ def __init__(self) -> None: def __call__(self, X: T.Tensor) -> T.Tensor: """Calling the adding operation without gradient""" - with T.no_grad(): - return X[0] - X[1] + return X[0] - X[1] if __name__ == "__main__":