Mercurial > pylearn
comparison pylearn/algorithms/mcRBM.py @ 973:aa201f357d7b
mcRBM - added numpy import
author | James Bergstra <bergstrj@iro.umontreal.ca> |
---|---|
date | Mon, 23 Aug 2010 15:59:40 -0400 |
parents | 0b392d1401c5 |
children | f2cdcc71ece1 |
comparison
equal
deleted
inserted
replaced
972:0b392d1401c5 | 973:aa201f357d7b |
---|---|
138 # - \sum_i a_i v_i | 138 # - \sum_i a_i v_i |
139 | 139 |
140 import sys | 140 import sys |
141 import logging | 141 import logging |
142 import numpy as np | 142 import numpy as np |
143 import numpy | |
143 from theano import function, shared, dot | 144 from theano import function, shared, dot |
144 from theano import tensor as TT | 145 from theano import tensor as TT |
145 import theano.sparse #installs the sparse shared var handler | 146 import theano.sparse #installs the sparse shared var handler |
146 floatX = theano.config.floatX | 147 floatX = theano.config.floatX |
147 | 148 |
148 from pylearn.sampling.hmc import HMC_sampler | 149 from pylearn.sampling.hmc import HMC_sampler |
149 from pylearn.io import image_tiling | 150 from pylearn.io import image_tiling |
150 | 151 |
151 from sparse_coding import numpy_project_onto_ball | 152 from sparse_coding import numpy_project_onto_ball |
153 | |
154 print >> sys.stderr, "mcRBM IS NOT READY YET" | |
155 | |
152 | 156 |
153 #TODO: This should be in the nnet part of the library | 157 #TODO: This should be in the nnet part of the library |
154 def sgd_updates(params, grads, lr): | 158 def sgd_updates(params, grads, lr): |
155 try: | 159 try: |
156 float(lr) | 160 float(lr) |