I have trained my Densenet and vgg model succesfully. After that,
class MyEnsemble(nn.Module):
    def _init_(self, modelA, modelB):
        super(MyEnsemble, self)._init_()
        self.modelA = modelA
        self.modelB = modelB
        self.classifier = nn.Linear(4, 2)
        
    def forward(self, x1, x2):
        x1 = self.modelA(x1)
        x2 = self.modelB(x2)
        x = torch.cat((x1, x2), dim=1)
        x = self.classifier(F.relu(x))
        return x

        model_ensemb = MyEnsemble(model_vgg, model_dense)
        x1, x2 = torch.randn(64,3,3,3), torch.randn(1, 64)
        output = model_ensemb(x1, x2)

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-35-cea5a04b5109> in <module>
      1 model_ensemb = MyEnsemble(model_vgg, model_dense)
      2 x1, x2 = torch.randn(64,3,3,3), torch.randn(1, 64)
----> 3 output = model_ensemb(x1, x2)

c:\users\2115\appdata\local\programs\python\python38\lib\site-packages\torch\nn\modules\module.py in _call_(self, *input, **kwargs)
    530             result = self._slow_forward(*input, **kwargs)
    531         else:
--> 532             result = self.forward(*input, **kwargs)
    533         for hook in self._forward_hooks.values():
    534             hook_result = hook(self, input, result)

<ipython-input-24-40da828f3d9f> in forward(self, x1, x2)
      7 
      8     def forward(self, x1, x2):
----> 9         x1 = self.modelA(x1)
     10         x2 = self.modelB(x2)
     11         x = torch.cat((x1, x2), dim=1)

c:\users\2115\appdata\local\programs\python\python38\lib\site-packages\torch\nn\modules\module.py in _call_(self, *input, **kwargs)
    530             result = self._slow_forward(*input, **kwargs)
    531         else:
--> 532             result = self.forward(*input, **kwargs)
    533         for hook in self._forward_hooks.values():
    534             hook_result = hook(self, input, result)

c:\users\2115\appdata\local\programs\python\python38\lib\site-packages\torchvision\models\vgg.py in forward(self, x)
     41 
     42     def forward(self, x):
---> 43         x = self.features(x)
     44         x = self.avgpool(x)
     45         x = torch.flatten(x, 1)

c:\users\2115\appdata\local\programs\python\python38\lib\site-packages\torch\nn\modules\module.py in _call_(self, *input, **kwargs)
    530             result = self._slow_forward(*input, **kwargs)
    531         else:
--> 532             result = self.forward(*input, **kwargs)
    533         for hook in self._forward_hooks.values():
    534             hook_result = hook(self, input, result)

c:\users\2115\appdata\local\programs\python\python38\lib\site-packages\torch\nn\modules\container.py in forward(self, input)
     98     def forward(self, input):
     99         for module in self:
--> 100             input = module(input)
    101         return input
    102 

c:\users\2115\appdata\local\programs\python\python38\lib\site-packages\torch\nn\modules\module.py in _call_(self, *input, **kwargs)
    530             result = self._slow_forward(*input, **kwargs)
    531         else:
--> 532             result = self.forward(*input, **kwargs)
    533         for hook in self._forward_hooks.values():
    534             hook_result = hook(self, input, result)

c:\users\2115\appdata\local\programs\python\python38\lib\site-packages\torch\nn\modules\conv.py in forward(self, input)
    343 
    344     def forward(self, input):
--> 345         return self.conv2d_forward(input, self.weight)
    346 
    347 class Conv3d(_ConvNd):

c:\users\2115\appdata\local\programs\python\python38\lib\site-packages\torch\nn\modules\conv.py in conv2d_forward(self, input, weight)
    339                             weight, self.bias, self.stride,
    340                             _pair(0), self.dilation, self.groups)
--> 341         return F.conv2d(input, weight, self.bias, self.stride,
    342                         self.padding, self.dilation, self.groups)
    343 

RuntimeError: Expected object of device type cuda but got device type cpu for argument #1 'self' in call to _thnn_conv2d_forward

I am trying model_ensemb.cuda(). If that is the solution, I am going to feel really bad:D