Skip to content

Add Adam* convenience constructors - #780

Open
kenhkan wants to merge 1 commit into
hasktorch:masterfrom
kenhkan:adam-convenience-constructors
Open

Add Adam* convenience constructors#780
kenhkan wants to merge 1 commit into
hasktorch:masterfrom
kenhkan:adam-convenience-constructors

Conversation

@kenhkan

@kenhkan kenhkan commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

@junjihashimoto Continuing the conversation on your suggestion in #777 , is this what you meant? It looks like there isn't one for the standard Adam so I added that as well.

@junjihashimoto

Copy link
Copy Markdown
Member
src/Torch/Optim.hs:119:17: error: [GHC-83865]
    • Couldn't match expected type ‘[Parameter] -> AdamW’
                  with actual type ‘Adam’
    • Possible cause: ‘mkAdam’ is applied to too many arguments
      In the expression: mkAdam 0 0.9 0.999 0.01
      In an equation for ‘mkDefaultAdam’:
          mkDefaultAdam = mkAdam 0 0.9 0.999 0.01
    |
119 | mkDefaultAdam = mkAdam 0 0.9 0.999 0.01
    |                 ^^^^^^^^^^^^^^^^^^^^^^^

There's a compilation error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants