diff --git a/syft/frameworks/torch/hook/hook.py b/syft/frameworks/torch/hook/hook.py index 92fb6ef1317..8cb5c2094f5 100644 --- a/syft/frameworks/torch/hook/hook.py +++ b/syft/frameworks/torch/hook/hook.py @@ -444,12 +444,6 @@ def _hook_torch_module(self): the real :func:`torch.cat` will become :func:`torch.native_cat` and :func:`torch.cat` will have our hooking code. """ - - if torch.__version__ < "1.0.2": - # Hard fix for PyTorch versions < 1.0.2 - # usage of torch.jit requires a torch version < torch 1.1, so we still need to support this torch version - syft.torch.apply_fix16922(self.torch) - torch_modules = syft.torch.torch_modules for module_name, torch_module in torch_modules.items(): diff --git a/syft/frameworks/torch/torch_attributes.py b/syft/frameworks/torch/torch_attributes.py index 517f208893a..51bd0628674 100644 --- a/syft/frameworks/torch/torch_attributes.py +++ b/syft/frameworks/torch/torch_attributes.py @@ -158,21 +158,3 @@ def is_inplace_method(self, method_name): is_inplace = method_name[-1] == "_" and "__" not in method_name self.inplace_methods[method_name] = is_inplace return is_inplace - - @staticmethod - def apply_fix16922(torch): - """ - Apply the fix made in PR16922 of PyTorch until people use PyTorch 1.0.2 - :param torch: the pytorch module - """ - broken_funcs = [ - "max_pool1d", - "max_pool2d", - "max_pool3d", - "adaptive_max_pool1d", - "adaptive_max_pool2d", - "adaptive_max_pool3d", - ] - for broken_func in broken_funcs: - getattr(torch.nn.functional, broken_func).__module__ = "torch.nn.functional" - getattr(torch.nn.functional, broken_func).__name__ = broken_func