This function propagates the hidden units activation downwards to the visible units Note that we return also the pre_sigmoid_activation of the layer. As it will turn out later, due to how Theano deals with optimizations, this symbolic variable will be needed to write
(self, hid)
| 163 | return [pre_sigmoid_h1, h1_mean, h1_sample] |
| 164 | |
| 165 | def propdown(self, hid): |
| 166 | '''This function propagates the hidden units activation downwards to |
| 167 | the visible units |
| 168 | |
| 169 | Note that we return also the pre_sigmoid_activation of the |
| 170 | layer. As it will turn out later, due to how Theano deals with |
| 171 | optimizations, this symbolic variable will be needed to write |
| 172 | down a more stable computational graph (see details in the |
| 173 | reconstruction cost function) |
| 174 | |
| 175 | ''' |
| 176 | pre_sigmoid_activation = T.dot(hid, self.W.T) + self.vbias |
| 177 | return [pre_sigmoid_activation, T.nnet.sigmoid(pre_sigmoid_activation)] |
| 178 | |
| 179 | def sample_v_given_h(self, h0_sample): |
| 180 | ''' This function infers state of visible units given hidden units ''' |