Derivative of function [Python: This is forward: mean(((labels - prediction) ** 2))]

Samuel_B

New member
Joined
Jan 1, 2023
Messages
4
Hi if someone of you is familiar with python code and understand this equation.

Is someone able to make a derivative or backward of this in python code?
1673102332569.png



I can not figure it out....

Here i show you what i mean on another function i already made:

This is forward:
mean(((labels - prediction) ** 2))

And this is backward or derivation:

N = labels.shape[0]
first_grad = -2*(labels - prediction) / N
 
Last edited:
Hi if someone of you is familiar with python code and understand this equation.

Is someone able to make a derivative or backward of this in python code?
View attachment 34748



I can not figure it out....

Here i show you what i mean on another function i already made:

This is forward:
mean(((labels - prediction) ** 2))

And this is backward or derivation:

N = labels.shape[0]
first_grad = -2*(labels - prediction) / N
It looks like the mean-squared error of the predicted and Log-Sum-Exp Function. Just a guess.
 
Top