a = nn.AvgPool1d(2)
b = torch.randn(2,2,2)
c = a(b)

The above code works. BTW, c's type is Variable now. The same thing can happen on F.softmax too.
I thought nn.Module/torch.nn.functional can accept Variable only.