comparison pylearn/formulas/nnet.py @ 1490:9d2323513092

added formulas/nnet.py with inverse_max_pooling(...)
author Emmanuel Bengio <bengioe@iro.umontreal.ca>
date Wed, 27 Jul 2011 10:42:03 -0400
parents 35a3a4e2d999
children 8be8cdde97ee
comparison
equal deleted inserted replaced
1489:35a3a4e2d999 1490:9d2323513092
20 The shape of the input before pooling 20 The shape of the input before pooling
21 pooling_shape : 2D shape 21 pooling_shape : 2D shape
22 The shape of the pooling windows 22 The shape of the pooling windows
23 ignore_borders : boolean 23 ignore_borders : boolean
24 Will pad borders with zeros if true 24 Will pad borders with zeros if true
25
26 Returns
27 -------
28 ret : 4D tensor
29 A Theano variable with same shape as output_shape
25 """ 30 """
26 # flatten the input and repeat it 31 # flatten the input and repeat it
27 repeated_input = [max_pool_out.flatten()]*(pooling_shape[0]*pooling_shape[1]) 32 repeated_input = [max_pool_out.flatten()]*(pooling_shape[0]*pooling_shape[1])
28 33
29 # concatenate the repeated vectors into 34 # concatenate the repeated vectors into