chenyuntc / simple-faster-rcnn-pytorch

A simplified implemention of Faster R-CNN that replicate performance from origin paper
Other
3.97k stars 1.14k forks source link

error :overflow encountered in exp and multiply #171

Open x-Sapphire opened 4 years ago

x-Sapphire commented 4 years ago

/simple-faster-rcnn-pytorch-master/model/utils/bbox_tools.py:68: RuntimeWarning: overflow encountered in exp h = xp.exp(dh) src_height[:, xp.newaxis] /simple-faster-rcnn-pytorch-master/model/utils/bbox_tools.py:68: RuntimeWarning: overflow encountered in multiply h = xp.exp(dh) src_height[:, xp.newaxis] /simple-faster-rcnn-pytorch-master/model/utils/bbox_tools.py:69: RuntimeWarning: overflow encountered in exp w = xp.exp(dw) src_width[:, xp.newaxis] /simple-faster-rcnn-pytorch-master/model/utils/bbox_tools.py:69: RuntimeWarning: overflow encountered in multiply w = xp.exp(dw) src_width[:, xp.newaxis]

and in the visdom I cannot see any loss with cls or loc

liruixl commented 4 years ago

hello,how do you solve it? I met it too

shida666 commented 4 years ago

got the same problem, do you solve it?? thank you!

shida666 commented 4 years ago

hello,how do you solve it? I met it too

got the same problem, do you solve it?? thank you!

PeterBishop0 commented 4 years ago

same!Help! This Only happens when using caffe pre-trained

jaypmorgan commented 3 years ago

I was able to mitigate this issue by using the Adam optimizer (setting the use_adam bool in config to True).

I hope this helps.

ZichengDuan commented 3 years ago

I was able to mitigate this issue by using the Adam optimizer (setting the use_adam bool in config to True).

I hope this helps.

It works! Thanks. This is a rather wired problem, I couldn't figure out why the bbox_tools is affected by optimizers.

ZichengDuan commented 3 years ago

Updates. I changed the optimizer to Adam according to jaypmorgan's suggestion. The training and loss curves seem normal now, however, I am still encountering these warnings, even though my training process is not influenced by these warnings...

aiyodiulehuner commented 3 years ago

got the same problem