NTMC-Community / MatchZoo

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

How to properly call the DIIN model in the contrib file? #821

Closed LymanBin closed 4 years ago

uduse commented 4 years ago

Does this help?

https://github.com/NTMC-Community/MatchZoo/blob/fe0ccdd82500d116a7f945539ed05566fce90434/matchzoo/contrib/models/diin.py#L17-L41

LymanBin commented 4 years ago

I also refer to this, but when I run, I get an error: "ValueError: No data provided for" char_left ". Need data for each key in: ['text_left', 'text_right', 'char_left', 'char_right', 'match_left', 'match_right'] " I was wondering if I did not call it properly except for these parameters. Is there a tutorial on the diin model?

uduse commented 4 years ago

I think you may need to preprocess your data with its designated preprocessor:

https://github.com/NTMC-Community/MatchZoo/blob/926466ce4bbb29812210ad84c77227456f113c6d/matchzoo/preprocessors/diin_preprocessor.py#L15-L55

LymanBin commented 4 years ago

alright, thank you very much