MCPcopy Index your code
hub / github.com/lisa-lab/DeepLearningTutorials / get_jacobian

Method get_jacobian

code/cA.py:179–187  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 1

get_cost_updatesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected