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
hey,I try to use some other method like word2vec, xlnet and ERNIE.
but when I run the last part of code.(pytorch version),it failed.
# Generate the output of the Discriminator for real and fake data.
# First, we put together the output of the tranformer and the generator
**disciminator_input = torch.cat([hidden_states, gen_rep], dim=1)**
RuntimeError: Tensors must have same number of dimensions: got 3 and 2
I checked the shape below
gen_rep.shape ---->torch.Size([64, 768])
hidden_states.shape ---->torch.Size([64, 64, 768])
torch.cat((gen_rep,hidden_states),dim=1)
if I run the bert model it can work, but when I try to use other NLP model like Xlnet and ERNIE. it seems the issue of dimension is existing. How can I do?
The text was updated successfully, but these errors were encountered:
hey,I try to use some other method like word2vec, xlnet and ERNIE.
but when I run the last part of code.(pytorch version),it failed.
RuntimeError: Tensors must have same number of dimensions: got 3 and 2
I checked the shape below
gen_rep.shape ---->torch.Size([64, 768])
hidden_states.shape ---->torch.Size([64, 64, 768])
torch.cat((gen_rep,hidden_states),dim=1)
if I run the bert model it can work, but when I try to use other NLP model like Xlnet and ERNIE. it seems the issue of dimension is existing. How can I do?
The text was updated successfully, but these errors were encountered: