I have a CNN and a LSTM that I want to connect together to form some sort of ConvLSTM. The first layer in the CNN has a batchnorm2d layer which is then connected to a convolutional layer.
class ConvNet(nn.Module):
    def __init__(self, num_classes=20,flatten_size=2*5, inputs=3, recurrent=False):
        super(ConvNet, self).__init__()
        self.layer1 = nn.Sequential(
            nn.BatchNorm2d(inputs),
            nn.Conv2d(inputs, 32, kernel_size=(3,3), padding=0,stride=1),
            nn.ReLU(),
            nn.MaxPool2d(2),
            nn.BatchNorm2d(32)
            )
...

My image data and CNN model are moved to gpu i.e using .to(device) - data.to(device), cnn.to(device). Calling the cnn with the input - cnn(input) results in the error - Expected tensor for argument #1 ‘input’ to have the same type as tensor for argument #2 ‘weight’; but type CUDAType does not equal CUDAType (while checking arguments for cudnn_batch_norm). I really do not understand it. Also, how is CUDAType not equal to CUDAType. Are there different CUDATypes?