This is the unofficial code of Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes. which achieve state-of-the-art trade-off between accuracy and speed on cityscapes and camvid, without using inference acceleration and extra data
I get an error saying Expected more than 1 value per channel when training, got input size torch.Size([1, 512, 1, 1]). I am not surprised since the AdaptiveAvgPool2d block reduces height and width of the layers to just 1 as can be seen in the error message as well. There is no way that the BatchNorm2d layer can then compute the standard deviation. How is this supposed to work?
In the DAPPM module there is the following code for
self.scale4
:I get an error saying
Expected more than 1 value per channel when training, got input size torch.Size([1, 512, 1, 1])
. I am not surprised since theAdaptiveAvgPool2d
block reduces height and width of the layers to just 1 as can be seen in the error message as well. There is no way that the BatchNorm2d layer can then compute the standard deviation. How is this supposed to work?