Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Decode sentence embedding to sentence #135

Open
HareeshKumarKuruba opened this issue Sep 29, 2019 · 1 comment
Open

Decode sentence embedding to sentence #135

HareeshKumarKuruba opened this issue Sep 29, 2019 · 1 comment

Comments

@HareeshKumarKuruba
Copy link

HareeshKumarKuruba commented Sep 29, 2019

I am using infersent to embed sentences. Also at some point i want to decode embedding back to sentence. i tried infersent.decode(sentences) and got following error.

AttributeError: 'InferSent' object has no attribute 'decode'

is there an API to decode embedding to sentence with infersent?

@nickyeolk
Copy link

I am not sure what you mean by decoding sentences. Do you mean you want to recover the original sentence from the embeddings? If so that is not possible since encoding is a many-to-one function, meaning many sentences can have very similar embeddings.
Additionally the model was trained on a SNLI task rather than some sort of sequence to sequence model so it only has encoder weights.

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

No branches or pull requests

2 participants