Skip to content

Conversation

@Spnetic-5
Copy link
Collaborator

Adam Implementation:

  • Momentum Update:
    m = beta1 * m + (1 - beta1) * gradient

  • Adaptive Learning Rates Update:
    v = beta2 * v + (1 - beta2) * gradient**2

  • Bias-Corrected First and Second Moment Estimates:
    m_hat = m / (1 - beta1**t)
    v_hat = v / (1 - beta2**t)

  • Parameter Update:
    param = param - learning_rate * m_hat / (sqrt(v_hat) + epsilon)

@Spnetic-5 Spnetic-5 requested a review from milancurcic July 18, 2023 03:00
Copy link
Member

@milancurcic milancurcic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Good so far.

@milancurcic milancurcic added the enhancement New feature or request label Jul 18, 2023
@milancurcic milancurcic marked this pull request as ready for review July 19, 2023 15:23
Copy link
Member

@milancurcic milancurcic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Spnetic-5, this is almost good to go. The only thing missing is the convergence test for Adam in test/test_optimizers.f90.

@milancurcic
Copy link
Member

CI seems to have trouble downloading test files from GitHub. Not real failures; tests pass on my end.

@milancurcic
Copy link
Member

@Spnetic-5, just checking, your latest commit message mentions the convergence test but the commit doesn't actually include the test.

@Spnetic-5
Copy link
Collaborator Author

@Spnetic-5, just checking, your latest commit message mentions the convergence test but the commit doesn't actually include the test.

Sorry, forgot to push test file😅️

@Spnetic-5 Spnetic-5 requested review from jvdp1 and milancurcic July 24, 2023 01:55
@milancurcic
Copy link
Member

Thank you, @Spnetic-5, will merge. Please release v0.14.0 when ready.

@milancurcic milancurcic merged commit 6adc1c2 into modern-fortran:main Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants