RuntimeError: getCudnnDataType() not supported for B

My network like this:

class MultiDigitsNet(torch.nn.Module):
    def __init__(self):    
        super(MultiDigitsNet, self).__init__()
        self.conv1 = torch.nn.Conv2d(in_channels=3, out_channels=48, kernel_size=5, stride=1, padding=2)
        self.max_pool1 = torch.nn.MaxPool2d(kernel_size=2, stride=2)
        self.relu = torch.nn.ReLU()
    def forward(self, x):
        x = self.max_pool1(self.relu(self.conv1(x)))

When training network, I encountered the following error :

I have no idea about the meaning of this error. Why this error is happening and how to deal with it?

What is the type of the input you are giving to your network?
Is it correctly a Double or Float or Half Tensor wrapper into a Variable?

Thank you! I forgot to convert the type of input to Float(Double). The conversion solves my problem.

In my experience, when you run into the cudnn error, the best way is going to pdb (not necessary) and convert the input, weight etc to CPU tensor, reexecute the command, you’ll find the error message from TH, which is more friendly.