@ptrblck
Thanks for for tell me about MISMATCH of size.
Your example works fine but in my code, there is still something wrong.
I think It is problem of cuda().
I want to use GPU so I add cuda() like this
model = Network().cuda()
model = Network().train()
x = torch.randn(64, 3, 28, 28)
output = model(x)

this code give
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'weight'
so I changed to
x = torch.randn(64, 3, 28, 28)
to
x = Variable(torch.randn(64, 3, 28, 28).cuda())
and It occurs
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
What`s wrong !?