-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addition of the Loss derived type and of the MSE loss function #175
Conversation
@milancurcic what is the strategy for the tests? |
pure module function mse_derivative(true, predicted) result(res) | ||
real, intent(in) :: true(:) | ||
real, intent(in) :: predicted(:) | ||
real :: res(size(true)) | ||
res = 2 * (predicted - true) / size(true) | ||
end function mse_derivative |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should be checked if it is valid.
Thanks, @jvdp1, I'll start a test program. |
@jvdp1 I put a few very minimal tests that check the expected values given simple inputs. Feel free to add if you can think of better tests. I've been also thinking about how we can test for the integration of these loss functions with the network; perhaps also using simple inputs and known outputs, but pass them through the network type. |
Thank you. These tests LGTM.
|
On second thought, let's wait on testing the integration with the network (regardless of where those tests would be defined). As we implemented general mechanisms to specify and use losses and optimizers, it's become apparent to me the important to separate model creation (i.e. via the I'll merge this and open a separate issue. Thank you for the PR! |
As discussed with @milancurcic in #173 :
TODO: