Computes the jacobian of the hidden layer with respect to the input, reshapes are necessary for broadcasting the element-wise product on the right axis
(self, hidden, W)
| 177 | return T.nnet.sigmoid(T.dot(input, self.W) + self.b) |
| 178 | |
| 179 | def get_jacobian(self, hidden, W): |
| 180 | """Computes the jacobian of the hidden layer with respect to |
| 181 | the input, reshapes are necessary for broadcasting the |
| 182 | element-wise product on the right axis |
| 183 | |
| 184 | """ |
| 185 | return T.reshape(hidden * (1 - hidden), |
| 186 | (self.n_batchsize, 1, self.n_hidden)) * T.reshape( |
| 187 | W, (1, self.n_visible, self.n_hidden)) |
| 188 | |
| 189 | def get_reconstructed_input(self, hidden): |
| 190 | """Computes the reconstructed input given the values of the |