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
Describe the bug
The implementation of OneHotEmbeddings for fields other than text has two issues:
the value used in the counter is the instance of the class token, not the value of the token
during the computation of embedding in _add_embeddings_internal the type of the field is not taken into account
To Reproduce
Use OneHotEmbedding with field other than text and check the contents of the dictionary, which is printed out. Should include all values with count >= 3, but only includes the <unk>.
Expected behavior
The dictionary should include all values with count >= 3. During computation, the value of the specific field, not the text field should be used.
Environment (please complete the following information):
OS [Linux]:
Version [flair-0.4.3]:
Additional context
I will send a PR with the fix shortly.
The text was updated successfully, but these errors were encountered:
Describe the bug
The implementation of OneHotEmbeddings for fields other than text has two issues:
_add_embeddings_internal
the type of the field is not taken into accountTo Reproduce
Use OneHotEmbedding with field other than
text
and check the contents of the dictionary, which is printed out. Should include all values with count >= 3, but only includes the<unk>
.Expected behavior
The dictionary should include all values with count >= 3. During computation, the value of the specific field, not the text field should be used.
Environment (please complete the following information):
Additional context
I will send a PR with the fix shortly.
The text was updated successfully, but these errors were encountered: