Mercurial > ift6266
changeset 275:7b4507295eba
merge
author | Xavier Glorot <glorotxa@iro.umontreal.ca> |
---|---|
date | Mon, 22 Mar 2010 10:20:10 -0400 |
parents | 44409b6652aa (diff) f6d9b6b89c2a (current diff) |
children | 727ed56fad12 |
files | deep/stacked_dae/__init__.py deep/stacked_dae/mnist_sda.py deep/stacked_dae/nist_sda.py deep/stacked_dae/sgd_optimization.py deep/stacked_dae/stacked_dae.py deep/stacked_dae/utils.py deep/stacked_dae/v2/__init__.py deep/stacked_dae/v2/config.py.example deep/stacked_dae/v2/nist_sda.py deep/stacked_dae/v2/sgd_optimization.py deep/stacked_dae/v2/stacked_dae.py deep/stacked_dae/v2/utils.py |
diffstat | 3 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/data_generation/transformations/pycaptcha/Captcha/File.py Mon Mar 22 08:34:48 2010 -0400 +++ b/data_generation/transformations/pycaptcha/Captcha/File.py Mon Mar 22 10:20:10 2010 -0400 @@ -7,7 +7,7 @@ # Copyright (C) 2004 Micah Dowty <micah@navi.cx> # -import os, random +import os, random, cPickle # Determine the data directory. This can be overridden after import-time if needed. dataDir = os.path.join(os.path.split(os.path.abspath(__file__))[0], "data") @@ -41,7 +41,10 @@ else: path = os.path.join(dataDir, self.basePath, name) if os.path.isdir(path): - for content in os.listdir(path): + f = open(path + '/filelist.pkl') + filelist = cPickle.load(f) + f.close() + for content in filelist: if self._checkExtension(content): paths.append(os.path.join(path, content)) else:
--- a/data_generation/transformations/ttf2jpg.py Mon Mar 22 08:34:48 2010 -0400 +++ b/data_generation/transformations/ttf2jpg.py Mon Mar 22 10:20:10 2010 -0400 @@ -10,6 +10,7 @@ import sys, os, fnmatch, random import Image, ImageFont, ImageDraw, numpy +import cPickle class ttf2jpg(): def __init__(self, font_file = ''): @@ -26,8 +27,9 @@ self.char_list.append(chr(ord('A') + i) ) for i in range(0,26): self.char_list.append(chr(ord('a') + i) ) - files = os.listdir(self.font_dir) - self.font_files = fnmatch.filter(files, '*.ttf') + fnmatch.filter(files, '*.TTF') + f = open( self.font_dir + 'filelist.pkl' ,'r') + self.font_files = cPickle.load(f) + f.close() # get font name def get_settings_names(self):
--- a/scripts/launch_generate100.py Mon Mar 22 08:34:48 2010 -0400 +++ b/scripts/launch_generate100.py Mon Mar 22 10:20:10 2010 -0400 @@ -3,12 +3,13 @@ import os dir1 = "/data/lisa/data/ift6266h10/" -mach = "maggie16.iro.umontreal.ca,maggie15.iro.umontreal.ca" +mach = ["maggie16.iro.umontreal.ca,zappa8@iro.umontreal.ca"] +#test and valid sets for i,s in enumerate(['valid','test']): for j,c in enumerate([0.3,0.5,0.7,1]): l = str(c).replace('.','') - os.system("dbidispatch --condor --os=fc4,fc7,fc9 --machine=%s ./run_pipeline.sh -o %sdata/P%s_%s_data.ft -p %sdata/P%s_%s_params -x %sdata/P%s_%s_labels.ft -f %s%s_data.ft -l %s%s_labels.ft -c %socr_%s_data.ft -d %socr_%s_labels.ft -m 0.3 -z 0.1 -a 0.1 -b 0.25 -g 0.25 -s %d -y %d" % (mach, dir1, l, s, dir1, l, s, dir1, l, s, dir1, s, dir1, s, dir1, s, dir1, s, [20000,80000][i], 200+i*4+j)) + os.system("dbidispatch --condor --os=fc4,fc7,fc9 --machine=%s ./run_pipeline.sh -o %sdata/P%s_%s_data.ft -p %sdata/P%s_%s_params -x %sdata/P%s_%s_labels.ft -f %s%s_data.ft -l %s%s_labels.ft -c %socr_%s_data.ft -d %socr_%s_labels.ft -m %s -z 0.1 -a 0.1 -b 0.25 -g 0.25 -s %d -y %d" % (mach, dir1, l, s, dir1, l, s, dir1, l, s, dir1, s, dir1, s, dir1, s, dir1, s, c ,[20000,80000][i], 200+i*4+j)) #P07 for i in range(100): @@ -17,3 +18,9 @@ #PNIST07 for i in range(100): os.system("dbidispatch --condor --os=fc4,fc7,fc9 --machine=%s ./run_pipeline.sh -o %sdata/PNIST07_train%d_data.ft -p %sdata/PNIST07_train%d_params -x %sdata/PNIST07_train%d_labels.ft -f %strain_data.ft -l %strain_labels.ft -c %socr_train_data.ft -d %socr_train_labels.ft -m 0.7 -z 0.1 -a 0.1 -b 0.25 -g 0.25 -s 819200 -y %d -t %d" % (mach, dir1, i, dir1, i, dir1, i, dir1, dir1, dir1, dir1, 100+i,1)) + + + +#P07 +#for i in [90,94]:#[2,10,13,15,20,49,68,82,86,90,94]: + #os.system("dbidispatch --condor --mem=3900 --os=fc4,fc7,fc9 --machine=maggie16.iro.umontreal.ca --machine=maggie15.iro.umontreal.ca --machine=zappa8@iro.umontreal.ca ./run_pipeline.sh -o %sdata2/P07_train%d_data.ft -p %sdata2/P07_train%d_params -x %sdata2/P07_train%d_labels.ft -f %strain_data.ft -l %strain_labels.ft -c %socr_train_data.ft -d %socr_train_labels.ft -m 0.7 -z 0.1 -a 0.1 -b 0.25 -g 0.25 -s 819200 -y %d" % (dir1, i, dir1, i, dir1, i, dir1, dir1, dir1, dir1,100+i))