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
Hi,
This may be a dummy question, but when creating a BPEmb with add_pad_emb=True, how do I actually get the padding embedding and what is its ID ? This should maybe figure somewhere in the doc:
frombpembimportBPEmbbp=BPEmb(lang="en", vs=1000, dim=50, add_pad_emb=True)
print(bp.vs) # prints 1000, was expecting 1000+1 ?
Thanks for the great work,
derlin
The text was updated successfully, but these errors were encountered:
Hi,
not a dummy question at all. I've added this to the docstring:
This embedding is initizalized with zeros and appended to the end
of the embedding matrix. Assuming "bpemb" is a BPEmb instance, the
padding embedding can be looked up with "bpemb['<pad>']", or
directly accessed with "bpemb.vectors[-1]".
Hi,
This may be a dummy question, but when creating a
BPEmb
withadd_pad_emb=True
, how do I actually get the padding embedding and what is its ID ? This should maybe figure somewhere in the doc:Thanks for the great work,
derlin
The text was updated successfully, but these errors were encountered: