Hello Mentor,
Please guide.
Hey @Arjun_Palusa,
Is your query resolved, or is your query still there? If it is still there, then can you please DM me your implementation for the back_prop
function?
Cheers,
Elemento
Hey @Arjun_Palusa,
In your implementation of back_prop
, the formulae which you have implemented to compute grad_b1
and grad_b2
are incorrect.
For the forward propagation, we have the equations as follows:
where f
is our loss function. Now, in order to compute grad_b2
, we need to compute \frac{\partial L}{\partial z} * \frac{\partial z}{\partial {b_2}}. Similarly, in order to compute grad_b1
, we need to compute \frac{\partial L}{\partial h} * \frac{\partial h}{\partial {b_1}}. Since, you have implemented grad_W1
and grad_W2
correctly, I suppose implementing these 2 should be easier than what you have already done. Let us know if this helps.
Cheers,
Elemento
It will be better if you show what mistake we done in coding phase in backprog