allenai / deep_qa

A deep NLP library, based on Keras / tf, focused on question answering (but useful for other NLP too)
Apache License 2.0
404 stars 133 forks source link

Clean up the embeddings API and parameter passing #307

Closed matt-gardner closed 7 years ago

matt-gardner commented 7 years ago

Currently, there are keys around pretrained embeddings, projecting the embeddings, dropout, and so on, that are flat parameters to TextTrainer. There's also an embedding_dim parameter, which is a dict, with arbitrary allowed keys. We should make the flat parameters also a part of this dictionary, so the parameters look something like this:

"embeddings": {
  "words": {
    "dim": 100,
    "pretrained_file": "/path/to/glove",
    "fine_tune": false
  },
  "characters": {
    "dim": 16
  }
}