Hi Phil,
I tried this script on pytorch version 0.2.0 and on pytorch master branch. It ran without errors on both.
Can you tell me about what machine you are running this on, is it an old computer?
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)


layer1.cuda()
layer2_1.cuda()

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