Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSTM' object has no attribute '_flat_weights_names' #92

Open
Onkar-2803 opened this issue Feb 7, 2023 · 6 comments
Open

LSTM' object has no attribute '_flat_weights_names' #92

Onkar-2803 opened this issue Feb 7, 2023 · 6 comments

Comments

@Onkar-2803
Copy link

Have executed the collab notebook provided by you, I'm still getting the same error.

It seems version 1.3.1 of torch has been removed

To generate the error:
!pip install inltk
!pip install torch==1.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
from inltk.inltk import setup
setup('hi')
from inltk.inltk import get_embedding_vectors
vectors = get_embedding_vectors('भारत', 'hi')
vectors[0].shape

@OmkarDhekane
Copy link

I'm getting same error. @Onkar-2803 Did you get any solution for this?

@Onkar-2803
Copy link
Author

Hey, this seems like an error due to the python version.
You'll need to downgrade your python.

@OmkarDhekane
Copy link

OmkarDhekane commented May 15, 2023

After downgrading the python version to 3.7.16, the installation commands,

!pip install inltk
!pip install torch==1.3.1+cpu -f https://download.pytorch.org/whl/torch_stable.html

throws following error ->

Traceback (most recent call last):
File "/usr/local/bin/pip3", line 5, in
from pip._internal.cli.main import main
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in
from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 5, in
from pip._internal.cli.main import main
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 19, in
from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'

@Onkar-2803
Copy link
Author

Can you try to downgrade to python==3.6.9 and check if it works?
This worked for me.

@pradhanashwin
Copy link

i am on python 3.9. and have same issue. anyone has solutions for this

@Onkar-2803
Copy link
Author

Try Python version 3.6.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants