daily pastebin goal
82%
SHARE
TWEET

Untitled

a guest Dec 9th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import argparse
  2.  
  3. parser = argparse.ArgumentParser(description='Initialize Theano on IPython Cluster GPUs')
  4. parser.add_argument('--profile',type=str,default='nodb',
  5.                     help='profile name of IPython Cluster')
  6. args = parser.parse_args()
  7. profile = args.profile
  8.  
  9. print 'using ipython profile', profile
  10.  
  11. import hdl
  12. reload(hdl)
  13.  
  14. from hdl.models import SparseSlowModel
  15. from hdl.parallel_learners import SGD
  16. from hdl.display import display_final
  17.  
  18. whitenpatches = 160000
  19.  
  20. def go(l):
  21.  
  22.     databatch = l.get_databatch(whitenpatches)
  23.     l.model.learn_whitening(databatch)
  24.     l.model.setup()
  25.  
  26.     l.learn(iterations=350000)
  27.     l.change_target(.5)
  28.     l.learn(iterations=50000)
  29.     l.change_target(.5)
  30.     l.learn(iterations=50000)
  31.     l.change_target(.5)
  32.     l.learn(iterations=50000)
  33.  
  34.     display_final(l.model)
  35.  
  36.  
  37. lam_sparse = .1
  38.  
  39. 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),
  40.         datasource='vid075-chunks',batchsize=48,save_every=100000,display_every=40000,
  41.         ipython_profile=profile)
  42.  
  43. go(l)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top