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
Using non glove embeddings giving error: RuntimeError: The expanded size of the tensor (2048) must match the existing size (2148) at non-singleton dimension 1
#1177
Closed
xijianlim opened this issue
Oct 2, 2019
· 3 comments
Im using a SequenceTagger model but everytime I use word embeddings other than 'glove' im getting the following error:
RuntimeError: The expanded size of the tensor (2048) must match the existing size (2148) at non-singleton dimension 1. Target sizes: [9, 2048]. Tensor sizes: [9, 2148]
Ive tried this using stacked and non-stacked embeddings:
I had the same error due to name clash in the stacked embeddings. I had two embeddings of the same type computed for different fields in the input. This caused:
The expanded size of the tensor (xxx) must match the existing size (xxx) at non-singleton dimension 1
As a workaround I added a name option to the embedding classes, which allows me to set the name explicitly. Yet, there might be a better solution, where the StackedEmbeddings class takes care of the naming of the embeddings. E.g. a number prefix could be used to distinguish between the different "copies" of given embedding.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Im using a SequenceTagger model but everytime I use word embeddings other than 'glove' im getting the following error:
RuntimeError: The expanded size of the tensor (2048) must match the existing size (2148) at non-singleton dimension 1. Target sizes: [9, 2048]. Tensor sizes: [9, 2148]
Ive tried this using stacked and non-stacked embeddings:
Ive also tried the suggested stacked embeddings as per the documents and have the same kind of error:
Is there
The text was updated successfully, but these errors were encountered: