Deep-Semantic-Similarity-Model-PyTorch
Deep-Semantic-Similarity-Model-PyTorch copied to clipboard
transpose does not work
hi, it is obsession me that the l_Qs[i].transpose(1,2) when i test this method, i found that this method does not work
import torch
from torch.autograd import Variable
import numpy as np
q=np.random.rand(1,6,300)
q=Variable(torch.from_numpy(q).float())
print(q.size())
q.transpose(1,2)
print(q.size())
torch.Size([1, 6, 300])
torch.Size([1, 6, 300])
you have to change:
q.transpose(1,2)
to
q = q.transpose(1,2)