Skip to content

Commit bc701ab

Browse files
authored
Merge pull request #37 from pikma/patch-1
Add missing 'self' in code snippet
2 parents 3d84c1b + 15703d3 commit bc701ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neural-networks-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ An example code for forward-propagating a single neuron might look as follows:
5151
```python
5252
class Neuron(object):
5353
# ...
54-
def forward(inputs):
54+
def forward(self, inputs):
5555
""" assume inputs and weights are 1-D numpy arrays and bias is a number """
5656
cell_body_sum = np.sum(inputs * self.weights) + self.bias
5757
firing_rate = 1.0 / (1.0 + math.exp(-cell_body_sum)) # sigmoid activation function

0 commit comments

Comments
 (0)