train.py error
primary-studyer opened this issue · 3 comments
CUDA_VISIBLE_DEVICES=1 python train.py --resume_net=weights/vgg16_reducedfc.pth
| M2Det Training Program |
===> Constructing M2Det model
Loading resume network...
===> Loading Dataset...
<data.voc0712.VOCDetection object at 0x7f21b506d940>
===> Training M2Det on VOC
--------------out net(images) processing-----------
Traceback (most recent call last):
File "train.py", line 92, in
out = net(images)
File "/home/huangsiyuan/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/huangsiyuan/M2Det/M2Det-master/m2det.py", line 120, in forward
self.leachi, tum_outs[i-1][-1]
File "/home/huangsiyuan/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/huangsiyuan/M2Det/M2Det-master/layers/nn_utils.py", line 88, in forward
deconved_feat[i], self.latlayeri
File "/home/huangsiyuan/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/huangsiyuan/M2Det/M2Det-master/layers/nn_utils.py", line 19, in forward
x = self.conv(x)
File "/home/huangsiyuan/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/huangsiyuan/anaconda3/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 301, in forward
self.padding, self.dilation, self.groups)
RuntimeError: CUDA error: out of memory
Exception ignored in: <bound method _DataLoaderIter.del of <torch.utils.data.dataloader._DataLoaderIter object at 0x7f21b506dda0>>
Traceback (most recent call last):
File "/home/huangsiyuan/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 399, in del
File "/home/huangsiyuan/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 378, in _shutdown_workers
File "/home/huangsiyuan/anaconda3/lib/python3.6/multiprocessing/queues.py", line 337, in get
AttributeError: Can't get attribute 'Tensor' on None
How to slove this problem?
batch size问题 需要设置的小一点
Are you using m2det320_vgg16.py?
Where can I get it?