facebookresearch / InferSent

InferSent sentence embeddings
Other
2.28k stars 471 forks source link

Has `infersent.set_glove_path()` function been removed? #75

Closed antoinecomp closed 6 years ago

antoinecomp commented 6 years ago

Has infersent.set_glove_path() function been changed ?

infersent.set_glove_path("InferSent/dataset/GloVe/glove.840B.300d.txt")

Because I have the following error when running it:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-18-1a6368709557> in <module>()
      1 infersent = torch.load('InferSent/encoder/infersent1.pkl', map_location=lambda storage, loc: storage)
----> 2 infersent.set_glove_path("InferSent/dataset/GloVe/glove.840B.300d.txt")
      3 

AttributeError: 'collections.OrderedDict' object has no attribute 'set_glove_path'
MariaChen08 commented 6 years ago

Run into the same issue...

aconneau commented 6 years ago

Hi,

Yes, we made some modifications to InferSent recently, and the set_glove_path is now named set_w2v_path because it can include fastText vectors. Please take a look at the new README.

Best, Alexis

Nandimath commented 4 years ago

Hi, I am getting an error in set_w2v_path . W2V_PATH = 'dataset/fastText/crawl-300d-2M.vec' infersent.set_w2v_path(W2V_PATH)

AttributeError: 'collections.OrderedDict' object has no attribute 'set_w2v_path'

could someone please help?

TanayJhawar commented 2 years ago

Hi, I am getting an error in set_w2v_path . W2V_PATH = 'dataset/fastText/crawl-300d-2M.vec' infersent.set_w2v_path(W2V_PATH)

AttributeError: 'collections.OrderedDict' object has no attribute 'set_w2v_path'

could someone please help?

I am getting the same issue, any help?

kunalpatil0409 commented 2 years ago

Hi, I am getting an error in set_w2v_path . W2V_PATH = 'dataset/fastText/crawl-300d-2M.vec' infersent.set_w2v_path(W2V_PATH) AttributeError: 'collections.OrderedDict' object has no attribute 'set_w2v_path' could someone please help?

I am getting the same issue, any help?

Did you find the solution