MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / backward_pass

Method backward_pass

mla/neuralnet/layers/basic.py:79–86  ·  view source on GitHub ↗
(self, delta)

Source from the content-addressed store, hash-verified

77 return W + self._params["b"]
78
79 def backward_pass(self, delta):
80 dW = np.dot(self.last_input.T, delta)
81 db = np.sum(delta, axis=0)
82
83 # Update gradient values
84 self._params.update_grad("W", dW)
85 self._params.update_grad("b", db)
86 return np.dot(delta, self._params["W"].T)
87
88 def shape(self, x_shape):
89 return x_shape[0], self.output_dim

Callers

nothing calls this directly

Calls 1

update_gradMethod · 0.80

Tested by

no test coverage detected