aboutsummaryrefslogtreecommitdiff
path: root/model.py
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-04-29 18:23:45 -0400
committerAlex Auvolat <alex.auvolat@ens.fr>2015-04-29 18:23:45 -0400
commitfbcaf8643a68ef824c72b003c85c4a96e5362bb6 (patch)
tree263abef6ed7fae7ef3f9d552dc1719265ed3bda2 /model.py
parentb07bf7612b07a08bd1298b87347889a71d390012 (diff)
downloadtaxi-fbcaf8643a68ef824c72b003c85c4a96e5362bb6.tar.gz
taxi-fbcaf8643a68ef824c72b003c85c4a96e5362bb6.zip
Fix dumping and loading
Diffstat (limited to 'model.py')
-rw-r--r--model.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/model.py b/model.py
index c5c75d3..c89809f 100644
--- a/model.py
+++ b/model.py
@@ -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(