diff baseline/mlp/mlp_nist.py @ 378:60a4432b8071

added initial model for weights in jobman
author xaviermuller
date Mon, 26 Apr 2010 14:39:03 -0400
parents 76b7182dd32e
children 1509b9bba4cc
line wrap: on
line diff
--- a/baseline/mlp/mlp_nist.py	Sun Apr 25 17:12:03 2010 -0400
+++ b/baseline/mlp/mlp_nist.py	Mon Apr 26 14:39:03 2010 -0400
@@ -266,10 +266,13 @@
     divergence_flag_list=[]
     
     if data_set==0:
+        print 'using nist'
     	dataset=datasets.nist_all()
     elif data_set==1:
+        print 'using p07'
         dataset=datasets.nist_P07()
     elif data_set==2:
+        print 'using pnist'
         dataset=datasets.PNIST07()
     
     
@@ -294,6 +297,8 @@
     # check if we want to initialise the weights with a previously calculated model
     # dimensions must be consistent between old model and current configuration!!!!!! (nb_hidden and nb_targets)
     if init_model!=0:
+        print 'using old model'
+        print init_model
         old_model=numpy.load(init_model)
         classifier.W1.value=old_model['W1']
         classifier.W2.value=old_model['W2']
@@ -526,6 +531,7 @@
 										verbose = state.verbose,\
 										lr_t2_factor=state.lr_t2_factor,
                                         data_set=state.data_set,
+                                        init_model=state.init_model,
                                         channel=channel)
     state.train_error=train_error
     state.validation_error=validation_error