comparison pylearn/sandbox/scan_inputs_groups.py @ 1530:08b3e827575a

Change class path as Theano want to hide the Deprecated Module interface.
author Frederic Bastien <nouiz@nouiz.org>
date Fri, 12 Jul 2013 13:46:45 -0400
parents d15683416ebf
children
comparison
equal deleted inserted replaced
1529:9737834dcb0f 1530:08b3e827575a
386 the available inputs (as theano.generic), a probability of individual bit masking and 386 the available inputs (as theano.generic), a probability of individual bit masking and
387 a probability of modality masking. It will return the inputs list with randoms zeros entry 387 a probability of modality masking. It will return the inputs list with randoms zeros entry
388 and the index list with some positive values changed to negative values (groups masking)""" 388 and the index list with some positive values changed to negative values (groups masking)"""
389 def __init__(self, seed = 1): 389 def __init__(self, seed = 1):
390 self.M=theano.Module() 390 self.M=theano.Module()
391 self.M.rand = T.RandomStreams(seed) 391 self.M.rand = T.randomstreams.RandomStreams(seed)
392 self.seed = seed 392 self.seed = seed
393 mat = T.matrix('mat') 393 mat = T.matrix('mat')
394 noise_level_bit = T.dscalar('noise_level_bit') 394 noise_level_bit = T.dscalar('noise_level_bit')
395 noise_level_group = T.dscalar('noise_level_group') 395 noise_level_group = T.dscalar('noise_level_group')
396 self.M.out1 = self.M.rand.binomial(T.shape(mat), 1, 1 - noise_level_bit) * mat 396 self.M.out1 = self.M.rand.binomial(T.shape(mat), 1, 1 - noise_level_bit) * mat