I want to train my I3D network with GPU but got following error.
Traceback (most recent call last):
  File "train_sample.py", line 329, in <module>
    model_conv = train_model(rgb_i3d, criterion, optimizer,exp_lr_scheduler, num_epochs=5)
  File "train_sample.py", line 287, in train_model
    rbg_score, rgb_logits = rgb_i3d(inputs)
  File "/home/caglar/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/caglar/train-i3d/I3D_Pytorch.py", line 313, in forward
    logits = self.features(x)
  File "/home/caglar/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/caglar/.local/lib/python3.6/site-packages/torch/nn/modules/container.py", line 92, in forward
    input = module(input)
  File "/home/caglar/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/caglar/.local/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 480, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same

This is the network that I used for train.

  
      github.com
  
  
    rimchang/kinetics-i3d-Pytorch/blob/master/model/I3D_Pytorch.py 3
import torch.nn as nn
import torch

class BasicConv3d(nn.Module):
    def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):
        super(BasicConv3d, self).__init__()
        self.conv = nn.Conv3d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=padding,
                              bias=False)  # verify bias false

        # verify defalt value in sonnet
        self.bn = nn.BatchNorm3d(out_planes, eps=1e-3, momentum=0.001, affine=True)
        self.relu = nn.ReLU(inplace=True)

    def forward(self, x):
        x = self.conv(x)
        x = self.bn(x)
        x = self.relu(x)
        return x




  This file has been truncated. show original

  
  
    
    
  
  


And this is related part of my codes
device = torch.device( "cuda:0" if torch.cuda.is_available() else "cpu")  
#torch.cuda.is_available() return True in my compter

rgb_i3d = I3D(num_classes=NUM_CLASSES , input_channel=3)
rgb_i3d = rgb_i3d.to(device)
state_dict = torch.load(_CHECKPOINT_PATHS)
rgb_i3d.load_state_dict(state_dict)


for inputs, labels in dataloader:
     inputs = inputs.to(device)
     rbg_score, rgb_logits = rgb_i3d(inputs) #there is where my error occur



What is the problem? How can I fix it?