graph4ai / graph4nlp

Graph4nlp is the library for the easy use of Graph Neural Networks for NLP. Welcome to visit our DLG4NLP website (https://dlg4nlp.github.io/index.html) for various learning resources!
Apache License 2.0
1.67k stars 201 forks source link

visualize attention #548

Closed code-rex1 closed 2 years ago

code-rex1 commented 2 years ago

❓ Questions and Help

The library is super helpful, great work.

I would like to visualise attention like the following tutorial. http://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html

Other libraries like OpenNMT-py also support this feature.

Is there any optional argument to get attention information when I try to run translation example (NMT)?

Would really appreciate your help. 🙏

Screen Shot 2022-04-05 at 23 23 51
schenglee commented 2 years ago

Thank you very much for your feedback, unfortunately, we don't support attention visualization yet, we may consider putting it in the roadmap in the future, if you are interested in it, we welcome your PR!

code-rex1 commented 2 years ago

@schenglee can you provide some pointers and I would be happy to help.

smith-co commented 2 years ago

@schenglee I would be interested to contribute in this pull request. Can you please provide some pointers?

AlanSwift commented 2 years ago

This issue will be closed. Feel free to reopen it if needed.