Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import argparse
- parser = argparse.ArgumentParser(description='Initialize Theano on IPython Cluster GPUs')
- parser.add_argument('--profile',type=str,default='nodb',
- help='profile name of IPython Cluster')
- args = parser.parse_args()
- profile = args.profile
- print 'using ipython profile', profile
- import hdl
- reload(hdl)
- from hdl.models import SparseSlowModel
- from hdl.parallel_learners import SGD
- from hdl.display import display_final
- whitenpatches = 160000
- def go(l):
- databatch = l.get_databatch(whitenpatches)
- l.model.learn_whitening(databatch)
- l.model.setup()
- l.learn(iterations=350000)
- l.change_target(.5)
- l.learn(iterations=50000)
- l.change_target(.5)
- l.learn(iterations=50000)
- l.change_target(.5)
- l.learn(iterations=50000)
- display_final(l.model)
- lam_sparse = .1
- l = SGD(model=SparseSlowModel(patch_sz=32,N=1024,T=48,sparse_cost='l1',slow_cost=None,lam_sparse=lam_sparse,perc_var=99.0),
- datasource='vid075-chunks',batchsize=48,save_every=100000,display_every=40000,
- ipython_profile=profile)
- go(l)
Add Comment
Please, Sign In to add comment