Hi, I changed seq2seq tutorial code, word embedding RNN encoder part was changed to just encoder.
(for using the time-series data as an input)
class Encoder2(nn.Module): def __init__(self, input_size, hidden_size): super(Encoder2, self).__init__() self.fc = nn.Sequential( nn,Linear(input_size, hidden_size), nn.BatchNorm1d(hidden_size), nn.ReLU() ) def forward(self, input): output = self.fc(input).view(1,1,-1) return output
Then, I got this Runtime error
addmm(): argument 'mat1' (position 1) must be Variable, not torch.LongTensor
Though I checked the document (http://pytorch.org/docs/master/torch.html#torch.addmm),
I’m not sure what was happened.
Please tell me how does it come from.