The input to nn.Conv3d layers is expected to have the shape [batch_size, channels, depth, height, width]. In your case this would most likely correspond to [18, 6, 1, 32, 32], so you might want to permute the input into the expected shape.