You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue with calling following code in Python 3+: self.embeddings_index.values()[0]
Reason
In Python 3, dict.values() does not return list and following error will be raised:
dict_values does not support indexing
Solution
The line should be updated in python 3+ as following list(self.embeddings_index.values())[0].shape[-1]
In following files:
token_model.py
embeddings.py
The text was updated successfully, but these errors were encountered:
Barqawiz
changed the title
Python 3 issue - dict_values does not support indexing
Python 3 issue fix - dict_values does not support indexing
Feb 27, 2018
There is an issue with calling following code in Python 3+:
self.embeddings_index.values()[0]
Reason
In Python 3, dict.values() does not return list and following error will be raised:
Solution
The line should be updated in python 3+ as following
list(self.embeddings_index.values())[0].shape[-1]
In following files:
The text was updated successfully, but these errors were encountered: