Content
@
0 reply
0 recast
0 reaction
Angel
@angelcrypto
### Automatic differentiation in C++ ### Day 8: Forward mode implementation part 1 I've figured out how to implement the forward mode for the simple cases: Case 1: input x is a vector and output y is a real number. The second case is just a generalization of the output (y is also a vector).
7 replies
0 recast
0 reaction
Angel
@angelcrypto
I had some cool small examples of the manual execution and values of the gradients trace, but it got deleted somehow 🥲 I'll do it again and share it the next day!
2 replies
0 recast
0 reaction
tobey
@fklc
In forward mode, it seems that each forward pass can compute the gradient of the output with respect to only one input at a time. So if the input is a vector, would that be considered as 1 input or would each value in that vector be considered as 1 input (so x has n inputs basically)?
2 replies
0 recast
0 reaction
Angel
@angelcrypto
When treating the input as a single input vector, forward mode would compute dy/dx in one pass, and if you treat it as multiple inputs, the forward mode will compute it dy/dx_i for each value in that input, thus requiring multiple forward passing. Implementation wise, I'll have to think which way is better.
2 replies
0 recast
0 reaction
tobey
@fklc
Make sense, thank you for the clarification! 4390 $degen
1 reply
0 recast
1 reaction
tobey
@fklc
2 $degen
1 reply
0 recast
0 reaction