Before this PR, it was not possible to make two *_encoders (more concretely, it would not be possible to make two separate sentence_encoders that had different parameters). This PR attempts to change that by adopting a similar interface to how embedding layers are handled --- storing them in a dictionary where the key is the "type" of encoder.
@matt-gardner I have no idea if I did this properly, it's quite likely that the changes aren't far-reaching enough (i.e. I forgot to change something somewhere or consider some case).
This needs to work in order to implement the Gated Attention Reader.
Before this PR, it was not possible to make two
*_encoders
(more concretely, it would not be possible to make two separatesentence_encoders
that had different parameters). This PR attempts to change that by adopting a similar interface to how embedding layers are handled --- storing them in a dictionary where the key is the"type"
of encoder.@matt-gardner I have no idea if I did this properly, it's quite likely that the changes aren't far-reaching enough (i.e. I forgot to change something somewhere or consider some case).
This needs to work in order to implement the Gated Attention Reader.