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

Please Help #58

Closed
spl85 opened this issue Mar 18, 2020 · 0 comments
Closed

Please Help #58

spl85 opened this issue Mar 18, 2020 · 0 comments

Comments

@spl85
Copy link

spl85 commented Mar 18, 2020

Hello,
I am on step 5 of the tutorial using jupyter notebook, and have had an interesting time with the dependencies. I am trying to run this cell on step 5:

lang_model = torch.load('./data/lang_model/lang_model_cpu_v2.torch',
map_location=lambda storage, loc: storage)

vocab = load_lm_vocab('./data/lang_model/vocab_v2.cls')
q2emb = Query2Emb(lang_model = lang_model.cpu(),
vocab = vocab)

search_index = nmslib.init(method='hnsw', space='cosinesimil')
search_index.loadIndex('./data/search/search_index.nmslib')

however, an error is produced...

Note: be v. careful before removing this, as 3rd party device types

136         # likely rely on this behavior to properly .to() modules like LSTM.

--> 137 self._flat_weights = [getattr(self, weight) for weight in self._flat_weights_names]
138
139 # Flattens params (on CUDA)
'LSTM' object has no attribute '_flat_weights_names'
which originates in torch\nn\modules\module.py

This torch library is an old version of pytorch, right? There are also other libraries that I am having trouble getting a hold of. I am pretty sure that this is a compatibility error; is there anyway you could provide the torch library you used for this tutorial as it is not available to download. My OS is Win x64.

@spl85 spl85 closed this as completed Mar 19, 2020
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

1 participant