@11117 I ran your code (the following) on a machine without a gpu. My torch.version is 0.2.0_4 and no errors occurred. Could you update your pytorch or build from master and try again?
import torch
import torch.nn as nn
from torch.autograd import Variable
layer1=nn.Sequential(
    nn.AvgPool3d((2,1,1), stride=(2,1,1))
)
layer2_1=nn.Sequential(
    nn.Conv3d(1,64,(3,3,3),(1,1,1),(1,1,1)),
    nn.LeakyReLU(0.1),
)

layer1.double()
layer2_1.double()
inp = Variable(torch.Tensor(4,1,32,32,32).double())
out=layer1(inp)
out2=layer2_1(out)