nn.Linear's document is different between 0.2 and master. Now I am using 0.2. But below code is working. Is it ok and expected behavior?
fc = nn.Linear(10, 20) a = autograd.Variable(torch.randn(32, 5, 10)) b = fc(a) print('b', b.size()) # 32, 5, 20