OpenNMT / OpenNMT-tf

Neural machine translation and sequence learning using TensorFlow
https://opennmt.net/
MIT License
1.45k stars 390 forks source link

Compatibility with Visualization Tool SeqtoSeq Vis /LSTMVis #478

Open mohammedayub44 opened 5 years ago

mohammedayub44 commented 5 years ago

Hi,

I came across this Vis tool (Seq2seq vis or lstm vis) effectively shows some good visualizations for Sequence models. Looks like it uses model files form the other repo OpenNMT-py. Is there any way I can use this with the model files that are generated from this repo or out of box conversion to pyTorch models ? Otherwise I'm guessing I have to run the same experiments again with OpenNMT-py.

Thanks !

guillaumekln commented 5 years ago

Hi,

What do you want to visualize more specifically? OpenNMT-tf is not directly compatible with these tools.

mohammedayub44 commented 5 years ago

Presently, I visualize the attentions from the exported model which works fine. For comprehensive debugging of sequence model - the topk words at each word interval and vector space of each word in the sentence allows to detect if the model has not trained enough or is it a beam search problem error etc like they describe on the video. This makes it very clear to our language experts as well while demoing it. I guess you could develop it from scratch but was leaning more towards reusing this repo and saving time. I hope that helps.

guillaumekln commented 5 years ago

These tools have a very good demo effect but it's not clear how they can be used for debugging: if a model is not performing well, the tool will not help in finding and fixing the root cause which usually comes from the data or the training procedure.

mohammedayub44 commented 5 years ago

Sorry I meant troubleshooting the already learnt model, not the training process itself. However you are right, having some visual debugging tools while training might also be very helpful for fixing errors. So is there any motivation to include tools like this in OpenNMT-tf for already built models.

guillaumekln commented 5 years ago

Sorry I meant troubleshooting the already learnt model, not the training process itself. However you are right, having some visual debugging tools while training might also be very helpful for fixing errors.

Yes, I actually referred to trained models. My point is if a translation is bad, the visualization will not lead you to what should be fixed and the conclusion will usually be to continue training on more data.

So is there any motivation to include tools like this in OpenNMT-tf for already built models.

It could be a good feature but I will not be able to work on that.

mohammedayub44 commented 5 years ago

It could be a good feature but I will not be able to work on that.

Fair enough 👍 I know on the other repo (Seq2SeqVis) lot of folks have already raised a PR to include OpenNMT-tf support. I'll just wait for it.