Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how does a neural network work

HOW A NEURAL NET WORKS STEP BY STEP:

There is a matrix of nodes like this:

0 0 0
0 0 0
0 0 0

Inputs are fed in from the left. like this:

(.1) 0 0
(.24) 0 0		(inputs in parenthesis)
(0) 0 0

the next nodes data is calculated by multiplying A weight to each node 
in the layer before and then adding bias. And then putting in an 
activation function. Like this:

.1  ----(weight: 1)--> .1
.24 ----(weight: .5)--> .12  ----> .1 + .12 + 0 = .22 + bias
0   ----(weight: 2)-->  0


Each node has a bias, for this node lets say its .3

.22 + .3(bias) = .52

After all that you put it in an activation function.

tanh(.52) ---> data for the next node

Everything i showed above was just the caclulation for the 
first node in the second layer though so the matrix
would look like this
after all that.

.1 tanh(.52) 0
.24 0 0
0 0 0

Then you keep doing that for each layer until you reach the end.

Hope this helped?

(Q A)

Does each node have a weight?

No. Each connection has a weight. Or i guess you could say each node
has lots of weights each corresponding to a node in the last layer.


Does each node have a bias?
Yes each node has only one bias.


Comment

PREVIOUS NEXT
Code Example
Python :: how to iterate through a pandas dataframe 
Python :: iterative binary search 
Python :: alphabeticallly 
Python :: __add__ 
Python :: group a dataset 
Python :: spacy import doc 
Python :: bell number python 
Python :: sum of digits in python 
Python :: #add,remove and clear all values on set in python 
Python :: printing coloured and bold text in python 
Python :: how to send image to template thats not in static flask 
Python :: reverse a number in python 
Python :: how to check for updates from github in python 
Python :: python button graphics.py 
Python :: call class function by string python 
Python :: deletion in a binary search tree 
Python :: python kubernetes client find pod with name 
Python :: convert blocks to mb python 
Python :: assert in selenium python 
Python :: numpy random entries not repeat 
Python :: truncate spaces in python 
Python :: python random number between 0 and 1 
Python :: Power Crisis 
Python :: python sum only numbers 
Python :: NumPy resize Syntax 
Python :: import folder from another folder python 
Python :: pandas most and least occurrence value 
Python :: reverse list in python 
Python :: ensemble model using voting classifier 
Python :: aws django bucket setting 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =