Package dimer :: Package nnet :: Module autoencoder :: Class AELayer
[hide private]
[frames] | no frames]

Class AELayer

source code

object --+        
         |        
     Layer --+    
             |    
    SpeedLayer --+
                 |
                AELayer

An autoencoder layer

Nested Classes [hide private]

Inherited from Layer: __metaclass__

Instance Methods [hide private]
 
__init__(self, X, n_in, n_hidden, rng, thrng, dtype, clevel=0)
initialize an AE instance
source code
 
activation(self)
the symbolic activation function
source code
 
corrupt(self, X, corrupt_level)
theano function that adds binomial noise to the given input
source code
 
cost(self, l1, l2) source code
 
reconstruction_cost(self) source code
 
__str__(self)
str(x)
source code

Inherited from SpeedLayer: get_params, get_speeds, set_params, set_speeds, speed_update, weight_update

Inherited from Layer: get_flat_weights, get_weights, load_flat_weights, set_weights, weight_norm

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from SpeedLayer (private): _speed_update_f, _weight_update_f

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, X, n_in, n_hidden, rng, thrng, dtype, clevel=0)
(Constructor)

source code 

initialize an AE instance

Parameters:
  • X - input (theano.tensor)
  • n_in - input dimension (int)
  • n_hidden - hiddden dimension (int)
  • rng - random state (np.random.RandomState)
  • thrng - random state (theano.tensor.shared_randomstreams.RandomStreams)
  • dtype - dtype of weights (np.dtype)
  • clevel - keeps ``1-corruption_level`` entries of the inputs the same and zero-out randomly selected subset of size ``coruption_level``
Overrides: object.__init__

activation(self)

source code 

the symbolic activation function

Overrides: Layer.activation
(inherited documentation)

corrupt(self, X, corrupt_level)

source code 

theano function that adds binomial noise to the given input

first argument of theano.rng.binomial is the shape(size) of random numbers that it should produce second argument is the number of trials third argument is the probability of success of any trial this will produce an array of 0s and 1s where 1 has a probability of 1 - ``corruption_level`` and 0 with ``corruption_level``

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)