diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-04-29 18:23:45 -0400 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-04-29 18:23:45 -0400 |
commit | fbcaf8643a68ef824c72b003c85c4a96e5362bb6 (patch) | |
tree | 263abef6ed7fae7ef3f9d552dc1719265ed3bda2 /model.py | |
parent | b07bf7612b07a08bd1298b87347889a71d390012 (diff) | |
download | taxi-fbcaf8643a68ef824c72b003c85c4a96e5362bb6.tar.gz taxi-fbcaf8643a68ef824c72b003c85c4a96e5362bb6.zip |
Fix dumping and loading
Diffstat (limited to 'model.py')
-rw-r--r-- | model.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -30,7 +30,7 @@ from blocks.algorithms import GradientDescent, Scale, AdaDelta, Momentum from blocks.graph import ComputationGraph from blocks.main_loop import MainLoop from blocks.extensions import Printing -from blocks.extensions.saveload import Dump, LoadFromDump +from blocks.extensions.saveload import Dump, LoadFromDump, Checkpoint from blocks.extensions.monitoring import DataStreamMonitoring import data @@ -149,8 +149,9 @@ def main(): prefix='valid', every_n_batches=1000), Printing(every_n_batches=1000), - # Dump('taxi_model', every_n_batches=100), - # LoadFromDump('taxi_model'), + # Checkpoint('model.pkl', every_n_batches=100), + Dump('taxi_model', every_n_batches=100), + LoadFromDump('taxi_model'), ] main_loop = MainLoop( |