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

[MRG] add biGRU index selector and overlap layers, as well as tests and docs #185

Closed nelson-liu closed 7 years ago

nelson-liu commented 7 years ago

Add layers to do the BiGRU index selecting for the question-evidence common word feature in the Gated Attention Reader, and also an Overlap layer.

Overlap has some hacky casting in the mask to get around the bug in the tensorflow backend of keras that casts unmasked input to uint8 before concatenation.

built docs: biGRU index selector in api summary: https://137-47793051-gh.circle-artifacts.com/0/home/ubuntu/deep_qa/doc/_build/html/layers/core_layers.html#bigruindexselector biGRU index selector in full api reference: https://137-47793051-gh.circle-artifacts.com/0/home/ubuntu/deep_qa/doc/_build/html/api_doc/deep_qa.layers.html#module-deep_qa.layers.bigru_index_selector

overlap in api summary: https://137-47793051-gh.circle-artifacts.com/0/home/ubuntu/deep_qa/doc/_build/html/layers/core_layers.html#overlap overlap in full api reference: https://137-47793051-gh.circle-artifacts.com/0/home/ubuntu/deep_qa/doc/_build/html/api_doc/deep_qa.layers.html#module-deep_qa.layers.overlap