Skip to content

Commit 15703d3

Browse files
committed
Add missing 'self' in code snippet
Fix typo: add the missing "self" argument in a python method, in a code snippet.
1 parent eadb491 commit 15703d3

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
@@ -38,7 +38,7 @@ An example code for forward-propagating a single neuron might look as follows:
3838
```python
3939
class Neuron:
4040
# ...
41-
def forward(inputs):
41+
def forward(self, inputs):
4242
""" assume inputs and weights are 1-D numpy arrays and bias is a number """
4343
cell_body_sum = np.sum(inputs * self.weights) + self.bias
4444
firing_rate = 1.0 / (1.0 + math.exp(-cell_body_sum)) # sigmoid activation function

0 commit comments

Comments
 (0)