goru001 / inltk

Natural Language Toolkit for Indic Languages aims to provide out of the box support for various NLP tasks that an application developer might need
https://inltk.readthedocs.io
MIT License
824 stars 163 forks source link

Breaks with PyTorch==1.8.0 #70

Closed nikhilkmr300 closed 3 years ago

nikhilkmr300 commented 3 years ago

When I try to use the function get_embedding_vectors, I get the following error when I use PyTorch v1.8.0: 'LSTM' object has no attribute '_flat_weights_names'.

Somewhere along the release history, PyTorch might have removed this attribute. I've solved the issue temporarily by installing PyTorch v1.3.0 on conda and it works now, but a permanent fix would be nice.

Thanks!

nikhilkmr300 commented 3 years ago

Sorry, found this right now in closed issues: https://github.com/goru001/inltk/issues/67.

djsethi09 commented 3 years ago

Hello @nikhilkmr300 Please what is the solution that worked for you? I get this error with pytorch 1.8.1 'LSTM' object has no attribute '_flat_weights_names

nikhilkmr300 commented 3 years ago

Downgrading the version of PyTorch to 1.3 worked.

I used conda with the following command if I recall correctly (refer this):

conda install pytorch==1.3.0

The iNLTK docs provide a solution if you're using pip.