mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-21 20:46:46 +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):
|
def eval(self):
|
||||||
self.train(False)
|
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