MCPcopy
hub / github.com/ddbourgin/numpy-ml / _fwd

Method _fwd

numpy_ml/neural_nets/layers/layers.py:2486–2494  ·  view source on GitHub ↗

Actual computation of forward pass

(self, X)

Source from the content-addressed store, hash-verified

2484 return Y
2485
2486 def _fwd(self, X):
2487 """Actual computation of forward pass"""
2488 W = self.parameters["W"]
2489 b = self.parameters["b"]
2490 W_mask = self.parameters["W_mask"]
2491
2492 Z = X @ (W * W_mask) + b
2493 Y = self.act_fn(Z)
2494 return Y, Z
2495
2496 def backward(self, dLdy, retain_grads=True):
2497 """

Callers 1

forwardMethod · 0.95

Calls 1

act_fnMethod · 0.80

Tested by

no test coverage detected