Got NoneType, but expected torch.cuda.RealTensor bias

 def forward(self, weight, bias, input):                        
        # Assert we're using cudnn                                 
        for i in ([weight, bias, input]):                          
            if i is not None and not(cudnn.is_acceptable(i)):      
                raise Exception('You must be using CUDNN to use _EfficientBatchNorm')                                                 
        print(bias)              
        res = input.new(*self._output_size(input, weight))         
        self._cudnn_info = torch._C._cudnn_convolution_full_forward(                                                                  
            input, weight, bias, res,                              
            (self.padding, self.padding),                          
            (self.stride, self.stride),                            
            (self.dilation, self.dilation),                        
            self.groups, cudnn.benchmark                           
        )                        

        return res               
TypeError: _cudnn_convolution_full_forward received an invalid combination of arguments - got (torch.cuda.FloatTensor, torch.cuda.FloatTensor, NoneType, torch.cuda.FloatTensor, tuple, tuple, tuple, int, bool), but expected (torch.cuda.RealTensor input, torch.cuda.RealTensor weight, torch.cuda.RealTensor bias, torch.cuda.RealTensor output, std::vector<int> pad, std::vector<int> stride, std::vector<int> dilation, int groups, bool benchmark, bool deterministic)

hi, @diggerdu, i have meet the same problem, i can not solve it. have you got the idea?

i test the code in pytorch 0.1.12.post2, it work well.
but when to pytorch 0.3 it comes the error as you show.
but i do not know how to modify the code to fit the pytorch 0.3

I add a ‘False’, it works.
self._cudnn_info = torch._C._cudnn_convolution_full_forward(
input, weight, bias, res,
(self.padding, self.padding),
(self.stride, self.stride),
(self.dilation, self.dilation),
self.groups, cudnn.benchmark
)
modify to
self._cudnn_info = torch._C._cudnn_convolution_full_forward(
input, weight, bias, res,
(self.padding, self.padding),
(self.stride, self.stride),
(self.dilation, self.dilation),
self.groups, cudnn.benchmark, False
)

I solved, but I add a ‘True’ :joy:
deterministic mode may be better
thank you!

ok! but i meet a new problem, when used pytorch 0.3, loss decrease well, but error do not go down well. when used pytorch 0.1.12 everything is ok.