CSRNet-pytorch icon indicating copy to clipboard operation
CSRNet-pytorch copied to clipboard

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

Open berylyellow opened this issue 4 years ago • 3 comments

berylyellow avatar Sep 23 '20 02:09 berylyellow

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

raisinglc avatar Sep 27 '20 08:09 raisinglc

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

winston-wen avatar Aug 12 '21 02:08 winston-wen

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.

camerayuhang avatar Jul 23 '23 16:07 camerayuhang