# HG changeset patch # User fsavard # Date 1269012717 14400 # Node ID b077d9e97a3beda320bb0a9d4b8f6a7a17a9c484 # Parent 798d1344e6a2c16142e0904c1f2366d39f79ba85 Légères corrections à config.py.example et ajusté nist_sda pour utiliser la nouvelle 'interface' des datasets (nist_all()). diff -r 798d1344e6a2 -r b077d9e97a3b deep/stacked_dae/config.py.example --- a/deep/stacked_dae/config.py.example Fri Mar 19 11:12:40 2010 -0400 +++ b/deep/stacked_dae/config.py.example Fri Mar 19 11:31:57 2010 -0400 @@ -23,7 +23,7 @@ # remove paths we specifically don't want in $PYTHONPATH for bad_path in remove_these_from_pythonpath: - sys.path[:] = [el for el in sys.path if not el (bad_path, bad_path+"/")] + sys.path[:] = [el for el in sys.path if not el in (bad_path, bad_path+"/")] # Make the imports import ift6266 @@ -31,15 +31,19 @@ # Just making sure we're importing from the right place modules_to_check = [ift6266] for module in modules_to_check: - assert codebase_clone_path in module.__path__ + if not codebase_clone_path in module.__path__[0]: + raise RuntimeError("Module loaded from incorrect path "+module.__path__[0]) # Path to pass to jobman sqlschedule. IMPORTANT TO CHANGE TO REFLECT YOUR CLONE. # Make sure this is accessible from the default $PYTHONPATH (in your .bashrc) +# (and make sure every subdirectory has its __init__.py file) EXPERIMENT_PATH = "ift6266_experiment10.ift6266.deep.stacked_dae.nist_sda.jobman_entrypoint" # END EXPERIMENT ISOLATION CODE # ---------------------------------------------------------------------------- +from jobman import DD + ''' These are parameters used by nist_sda.py. They'll end up as globals in there. diff -r 798d1344e6a2 -r b077d9e97a3b deep/stacked_dae/nist_sda.py --- a/deep/stacked_dae/nist_sda.py Fri Mar 19 11:12:40 2010 -0400 +++ b/deep/stacked_dae/nist_sda.py Fri Mar 19 11:31:57 2010 -0400 @@ -61,17 +61,17 @@ print "Creating optimizer with state, ", state - optimizer = SdaSgdOptimizer(dataset=datasets.nist_all, + optimizer = SdaSgdOptimizer(dataset=datasets.nist_all(), hyperparameters=state, \ n_ins=n_ins, n_outs=n_outs,\ examples_per_epoch=examples_per_epoch, \ series=series, max_minibatches=rtt) - optimizer.pretrain(datasets.nist_all) + optimizer.pretrain(datasets.nist_all()) channel.save() - optimizer.finetune(datasets.nist_all) + optimizer.finetune(datasets.nist_all()) channel.save() return channel.COMPLETE