Clean up this scratch space

This commit is contained in:
bt3gl 2022-03-23 16:19:51 +04:00
parent 1de1667900
commit ed0cead015
62 changed files with 39650 additions and 13 deletions

7
numpy_examples/neuron.py Normal file
View file

@ -0,0 +1,7 @@
class Neuron(object):
# ...
def forward(inputs):
""" assume inputs and weights are 1-D numpy arrays and bias is a number """
cell_body_sum = np.sum(inputs * self.weights) + self.bias
firing_rate = 1.0 / (1.0 + math.exp(-cell_body_sum)) # sigmoid activation function
return firing_rate