Hi @tom,
thanks a lot for your reply.
Here is the code for padding/shape in PSPDec :
class PSPDec(nn.Module):

    def __init__(self, in_features, out_features, downsize, upsize=18):
        super(PSPDec,self).__init__()

        self.features = nn.Sequential(
            nn.AvgPool2d(downsize, stride=downsize),
            nn.Conv2d(in_features, out_features, 1, bias=False),
            nn.BatchNorm2d(out_features,momentum=.95),
            nn.ReLU(inplace=True),
            nn.UpsamplingBilinear2d(upsize)
        )

    def forward(self, x):
        return self.features(x)

Also , I have printed the layers being cated , here they are  :
 print('x', x.size())
        
        x = self.conv1(x)
        print('conv1', x.size())
        
        x = self.layer1(x)
        print('layer1', x.size())
        
        x = self.layer2(x)
        print('layer2', x.size())
        
        x = self.layer3(x)
        print('layer3', x.size())
        
        x = self.layer4(x)
        print('layer4', x.size())
        
        t5a = self.layer5a(x)
        print('layer5a',t5a.size())
        
        
        t5b = self.layer5b(x)
        print('layer5b',t5b.size())
        
        t5c = self.layer5c(x)
        print('layer5c',t5c.size())
        
        t5d = self.layer5d(x)
        print('layer5d',t5d.size())
        
        
        x = self.final(torch.cat([
            x,
            t5a,
            t5b,
            t5c,
            t5d,
        ], 1))
        
        print('final', x.size())

        return F.upsample_bilinear(final, x.size()[2:])

Here is the result :

x torch.Size([1, 3, 256, 256])
conv1 torch.Size([1, 64, 256, 256])
layer1 torch.Size([1, 256, 256, 256])
layer2 torch.Size([1, 512, 256, 256])
layer3 torch.Size([1, 1024, 256, 256])
layer4 torch.Size([1, 2048, 256, 256])
/opt/anaconda/lib/python3.6/site-packages/torch/nn/modules/upsampling.py:180: UserWarning: nn.UpsamplingBilinear2d is deprecated. Use nn.Upsample instead.
  warnings.warn("nn.UpsamplingBilinear2d is deprecated. Use nn.Upsample instead.")
layer5a torch.Size([1, 512, 18, 18])
layer5b torch.Size([1, 512, 18, 18])
layer5c torch.Size([1, 512, 18, 18])
layer5d torch.Size([1, 512, 18, 18])
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-24-7d73f3a481fa> in <module>()
      8         targets = Variable(labels)
      9 
---> 10         outputs = model(inputs)
     11         optimizer.zero_grad()
     12         print("outputs size ==> ",outputs.size())

/opt/anaconda/lib/python3.6/site-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
    323         for hook in self._forward_pre_hooks.values():
    324             hook(self, input)
--> 325         result = self.forward(*input, **kwargs)
    326         for hook in self._forward_hooks.values():
    327             hook_result = hook(self, input, result)

<ipython-input-7-86307f5840a1> in forward(self, x)
     74             t5c,
     75             t5d,
---> 76         ], 1))
     77 
     78         print('final', x.size())

RuntimeError: inconsistent tensor sizes at /opt/conda/conda-bld/pytorch_1513368888240/work/torch/lib/TH/generic/THTensorMath.c:2864

Can you please help me ?
Thanks a lot again.