I am deriving a Weight update for a simple toy network with a Sigmoid Output Layer. I need some help double checking my math to make sure I did it correctly.
I am using Cross-Entropy Loss as my Loss function:
Now, I have a 1 hidden layer network architecture so I am trying to update my 2nd weight matrix:
Chain Rule derivation to Update 2nd Weight Matrix:
Where This is the output of my hidden layer before I apply the sigmoid activation. A1 is the hidden layer activation matrix.
This is what I get so far for each part of the chain rule I derived above:
Finally with everything put together my derived partial derivative is:
This means sigmoid - y
is a scalar value (the error from my training example) and it is multiplied by the prior layer's activation matrix (A1). Does this derivation seem correct? Sorry for formatting. I don't know LaTex yet.