diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-06-17 17:25:19 -0400 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-06-17 17:25:19 -0400 |
commit | 8b9f95399e7b23aed493c7a67a9b56c5193ad53a (patch) | |
tree | f58a1cc0f97ff1785192972549ef6a8129fcc01a /paramsaveload.py | |
parent | 0ba1bd24fd2375fc4de5d355e434f747c03de202 (diff) | |
download | text-rnn-8b9f95399e7b23aed493c7a67a9b56c5193ad53a.tar.gz text-rnn-8b9f95399e7b23aed493c7a67a9b56c5193ad53a.zip |
xoxo
Diffstat (limited to 'paramsaveload.py')
-rw-r--r-- | paramsaveload.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/paramsaveload.py b/paramsaveload.py index 7181e9a..e44889d 100644 --- a/paramsaveload.py +++ b/paramsaveload.py @@ -19,13 +19,13 @@ class SaveLoadParams(SimpleExtension): def do_save(self): with open(self.path, 'w') as f: logger.info('Saving parameters to %s...'%self.path) - cPickle.dump(model.get_param_values(), f, protocol=cPickle.HIGHEST_PROTOCOL) + cPickle.dump(self.model.get_param_values(), f, protocol=cPickle.HIGHEST_PROTOCOL) def do_load(self): try: with open(self.path, 'r') as f: logger.info('Loading parameters from %s...'%self.path) - model.set_parma_values(cPickle.load(f)) + self.model.set_param_values(cPickle.load(f)) except IOError: pass |