mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-21 12:06:42 +08:00
Added support for python copy
This commit is contained in:
parent
e09bf35b28
commit
1b5e58cec3
@ -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)
|
Loading…
Reference in New Issue
Block a user