NTMC-Community / MatchZoo

Facilitating the design, comparison and sharing of deep text matching models.
Apache License 2.0
3.84k stars 898 forks source link

Implemented ESIM model #673

Closed crystina-z closed 5 years ago

crystina-z commented 5 years ago

the implementation relates to issue #672

jellying commented 5 years ago

I run your model on WikiQA dataset but the loss descends to 0 when the second epoch starts, so does the version I implemented in pr #666 . I can't solve it yet. Would you mind sharing your running scripts or your parameters settings?

crystina-z commented 5 years ago

@jellying sure, shared here. Some setup required and please refer to the README for details :)

crystina-z commented 5 years ago

@jellying sure, shared here. Some setup required and please refer to the README for details :)

Thanks a lot. I think the process that you filter the text with 0 length solves the nan promblem. I run the script esim_wikiqa.py and get the max mAP 0.6212 on test data. I wonder how to set a better paramters to reach the mAP 0.7 mentioned in your issue #672.

That's actually weird since for the few times I run the script the map fluctuated between 0.67 to 0.71.. Let me try it again and get back to u later! btw I did notice that the default lr hurts the performance a bit. Yet so far I'm tuning the lr by directly changing the compile() function... it's definitely not encouraged yet I still haven't found a delicate way to do it. Just you might want to try lr=4e-4 to see if the performance gets any better.

A new update: it's actually handy to control the lr=4e-4, by just add model['optimizer'] = keras.optimizers.Adam(lr=4e-4) (actually suggested by @bwanglzu up there yet I didn't get it in the first place, thanks again here!)

crystina-z commented 5 years ago

@jellying sure, shared here. Some setup required and please refer to the README for details :)

Thanks a lot. I think the process that you filter the text with 0 length solves the nan promblem. I run the script esim_wikiqa.py and get the max mAP 0.6212 on test data. I wonder how to set a better paramters to reach the mAP 0.7 mentioned in your issue #672.

Hi! sorry for the late reply. I'm sorry I still not sure for the reason...I actually run the same script quite a few times and the result is never lower than 0.66 (see the test result here). May I wonder if you use the pretrained embedding? That's the only reason i can think for now...

codecov-io commented 5 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (2.1-dev@145c52d). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             2.1-dev     #673   +/-   ##
==========================================
  Coverage           ?   96.75%           
==========================================
  Files              ?       84           
  Lines              ?     2618           
  Branches           ?        0           
==========================================
  Hits               ?     2533           
  Misses             ?       85           
  Partials           ?        0
Impacted Files Coverage Δ
matchzoo/contrib/models/esim.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 145c52d...719ba37. Read the comment docs.