Mercurial > pylearn
comparison doc/v2_planning/plugin_RP.py @ 1173:a0f178bc9052
changes during the meeting
author | pascanur |
---|---|
date | Fri, 17 Sep 2010 16:12:33 -0400 |
parents | 3c2d7c5f0cf7 |
children | fe6c25eb1e37 |
comparison
equal
deleted
inserted
replaced
1172:3c2d7c5f0cf7 | 1173:a0f178bc9052 |
---|---|
103 def save_model(self, event): | 103 def save_model(self, event): |
104 if event.type == early_stopper.new_best_error(): | 104 if event.type == early_stopper.new_best_error(): |
105 cPickle.dump(model.parameters(), open('best_params.pkl','wb')) | 105 cPickle.dump(model.parameters(), open('best_params.pkl','wb')) |
106 | 106 |
107 | 107 |
108 # Create the dependency graph describing what does what | 108 # Create the dependency graph describing what does what |
109 train_data.act( on = sched.begin(), when = once() ) | |
110 train_data.act( on = Event('batch'), | |
111 train_data.act( on = train_model.done(), when = always()) | |
109 train_model.act(on = train_data.batch(), when = always()) | 112 train_model.act(on = train_data.batch(), when = always()) |
110 validate_model.act(on = train_model.done(), when = every(n=10000)) | 113 validate_model.act(on = train_model.done(), when = every(n=10000)) |
111 early_stopper.act(on = validate_model.error(), when = always()) | 114 early_stopper.act(on = validate_model.error(), when = always()) |
112 print_error.act( on = train_model.error(), when = always() ) | 115 print_error.act( on = train_model.error(), when = always() ) |
113 print_error.act( on = train_data.eod(), when = always() ) | 116 print_error.act( on = train_data.eod(), when = always() ) |
114 save_model.act( on = eraly_stopper.new_best_errot(), when = always() ) | 117 save_model.act( on = eraly_stopper.new_best_errot(), when = always() ) |
115 | 118 |