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

Ranking loss in sentence selection #353

Closed matt-gardner closed 7 years ago

matt-gardner commented 7 years ago

This isn't working yet; I'm running into a funny error with actually using this loss function. Once I figure out that error, though, this should be good to use.

matt-gardner commented 7 years ago

Turns out the error was because tensorflow couldn't compute a gradient for variables when there was a switch in the loss function. This is actually kind of troubling, because it might mean all of our models and layers that use switch might be broken... Replacing the switch with an addition fixed things, though, so this is now ready to review.

matt-gardner commented 7 years ago

@haniesedghi, FYI.