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 132 forks source link

Two main improvements: VectorMatrixMerge and separate embeddings #114

Closed matt-gardner closed 8 years ago

matt-gardner commented 8 years ago

There were a couple of places where we had lots of code in _build_model() that does a fancy merge. I made that into its own layer, to clean up the code a bit, and allow for more code re-use, because we did this kind of merge in a couple of different spots.

Also, in looking at how end-to-end memory networks are structured, I realized that we needed to handle the embedding a little differently. Now you can create as many different embeddings as you like, by passing different embedding names to the _embed_input() function. I don't know why you would want to do this except in the bAbI dataset, but you now can if you want to...

matt-gardner commented 8 years ago

Thanks for the review. I made the changes. Merging now.