🔎 Stanford CS231n 강의를 듣고 기록용도로 정리하는 게시글입니다.

A computational graph for a linear classifier
Advantage: we can use backpropagation










Each node of the computational graph is only aware of its immediate surroundings.

Backprop

결론: At each node, compute the local gradient and keep track of it. During backprop, as we receive numerical values of gradients coming from upstream, multiply it by local gradient, send it back to the next nodes going backwards.










local gradient









In our computational graph, we looked at each node locally and computed the local gradients and chained them with upstream gradients coming down.
You can think of this as forward and backward api.
Forward pass: implement a function computing the output of this node
backward pass: compute the gradient
implement this in code, exactly the same way

implementation for MUL gate

forward pass: gets x and y as inputs, returns value zbackward pass: get dz as input(=upstream gradient), output the gradients on the input's x and y to pass down
top_diff as input(upstream gradient) and multiply it by local gradient that we computed.
Instead of using a single linear transformation, if we want a neural network, we can stack two of these together(simple form) ⇒ get a 2-layer network
Neural networks are a class of functions where we have a simpler functions that are stacked on top of each other → stack them in a hierarchical way in order to make up a more complex non-linear function
They have multiple stages of hierarchical computations.

Weight matrix was something like a template
Now, can still be those kinds of templates, but each of this intermediate variable , has scores for these templates, and we have another layer on top that combines these together.

Neuron has impluses carried towards each neuron.
Cell body integrates signals that are coming in → pass on → carries away to downsteam neurons that are connected to, and carries this away through axons
With each computational node, you can see it in a similar way




