leeyeehoo / CSRNet-pytorch

CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes
642 stars 259 forks source link

训练part_A数据集,batch size=1,loss震荡很厉害,有什么解决办法吗 #83

Open berylyellow opened 3 years ago

raisinglc commented 3 years ago

把batch size调大 batch size = 1不就是online update,噪声肯定大

winston-wen commented 2 years ago

我冒昧揣测一下, 你用bsize=1是因为显存不够用吧? 如果是的话, 大胆一点, 把vgg层数和每层通道数降一降. 或许能顺便解决 loss震荡 的次生灾害.

camerayuhang commented 11 months ago

Setting the batch size to 1 is because the varying dimensions of input images. If all images had the same dimensions, we could increase the batch size. However, since the dimensions of the images are different, the batch size has to be set to 1. This is because we cannot stack images with different sizes into a single batch.