[Solved] Addmm() error is happened at encoder

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),

    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.

Thank you,

I add these lines and it runs!
I changed input format and add channel.

input = input.type(torch.FloatTensor)
input = Variable(input).view(1,1,input_size)

Thank you.