Added support for python copy

This commit is contained in:
Manish Aradwad 2024-01-01 17:20:03 +00:00
parent e09bf35b28
commit 1b5e58cec3

View File

@ -439,3 +439,11 @@ class Module(dict):
def eval(self):
self.train(False)
def __getstate__(self):
state = self.__dict__.copy()
state.pop("_compiled_call_impl", None)
return state
def __setstate__(self, state):
self.__dict__.update(state)