clab / clab/dynet

Updating DyNet configuration parameters

Open
#1,071 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
3.4k
Forks
701
PR merge metrics
No merged PRs in 30d

Description

Is there a way to update the parameters after DyNet is initialized? For example, in a hyperparameter-tuning script, I'd like to change `weight_decay` for each new sample of hyperparameters.

I don't understand the difference between `DynetParams` and `dynet_config`. The [documentation](http://dynet.readthedocs.io/en/latest/python_ref.html) says I can use either, but `dynet_config` must be used before `import dynet`. However, it seems like I can't use `DynetParams` after `import dynet` either, because once I call `dyparams.init()` I get

WARNING: Attempting to initialize dynet twice. Ignoring duplicate initialization.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.