What does print(torch.__version__) returns just before your try to import fairseq?
You might have an older version of pytorch somewhere on your system.
Hi @ptrblck Thank you so much for your reply. I can able to run the given piece of code. Even I cannot see this issue without fairseq. I think then this is much more relevant to fairseq then and raising the issue there again.
Your support and time is much appreciated. Thank you again