Skip to content
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

params in MomentumSGDTrainer #1

Closed
johnzw opened this issue Jul 31, 2017 · 4 comments
Closed

params in MomentumSGDTrainer #1

johnzw opened this issue Jul 31, 2017 · 4 comments

Comments

@johnzw
Copy link

johnzw commented Jul 31, 2017

Hi I was trying out your demo when I run into error at line 166, Mimick/mimick/model.py
trainer = dy.MomentumSGDTrainer(model.model, options.learning_rate, 0.9, 0.1)

The error message shows that MomentumSGDTrainer takes 3 parameters, as in
MomentumSGDTrainer(ParameterCollection &m, real learning_rate = 0.01, real mom = 0.9)

wondering is there a version conflict? But I installed the v2.0 dynet, following your README.

So what is this last parameter 0.1? Do I just simply delete it?

Thanks in advance!

@yuvalpinter
Copy link
Owner

yuvalpinter commented Jul 31, 2017

Huh, interesting.
The version of DyNet I work with features an extra edecay parameter specifying learning rate decay. It seems DyNet 2.0 supports it (at least there's no error from interactive mode), and it's present in the DyNet 1.0 handbook (page 43). Since it doesn't appear in the online docs I'm not sure what its omission would do, but it would be interesting to try...

Possibly related: clab/dynet#138 @neubig

@neubig
Copy link

neubig commented Aug 1, 2017

There has recently been a change in the training interface to simplify things:
clab/dynet#695

I'd suggest upgrading to the most recent version, but if you'd prefer not to, the DyNet 2.0 version should still work as well:
https://github.com/clab/dynet/releases/tag/v2.0

@yuvalpinter
Copy link
Owner

Thanks Graham! I'll leave this issue open until we upgrade to the latest DyNet release.

@yuvalpinter
Copy link
Owner

The code is now updated to DyNet 2.0!

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

No branches or pull requests

3 participants