I am trying to understand how to build configuration file for our experiements
let us take this example from the AllenNLP documentation
From where we got "token_embedders"? shouldn't be "basic" as documentation here?
or do I miss something?
There is a bit of a short-cut going on here. The long form would be this:
"model": {
"type": "simple_classifier",
"embedder": {
"type": "basic",
"token_embedders": {
...
}
}
}
BasicTextFieldEmbedder
is the default implementation of TextFieldEmbedder
, and that's why you don't have to explicitly say "type": "basic"
. "token_embedders"
is simply a parameter of BasicTextFieldEmbedder.__init__()
, as seen here: https://github.com/allenai/allennlp/blob/master/allennlp/modules/text_field_embedders/basic_text_field_embedder.py#L35