Based on the error message it seems you are using an nn.Conv3d module, which expect a 5-dimensional tensor as the input in the shape [batch_size, channels, depth, height, width], while one of these dimensions are missing (given the posted shape I guess it could be the channel dimension).