训练问题
ShichenHuang0423 opened this issue · comments
loading annotations into memory...
Done (t=7.73s)
creating index...
index created!
loading annotations into memory...
Done (t=14.09s)
creating index...
index created!
2022-02-10 14:15:25,602 - INFO - Start running, host: root@I9572b669d005014a9, work_dir: /hy-tmp/ReDet/work_dirs/ReDet_re50_refpn_1x_dota15_ms
2022-02-10 14:15:25,602 - INFO - workflow: [('train', 1)], max: 12 epochs
Traceback (most recent call last):
File "tools/train.py", line 95, in
main()
File "tools/train.py", line 91, in main
logger=logger)
File "/hy-tmp/ReDet/mmdet/apis/train.py", line 61, in train_detector
_non_dist_train(model, dataset, cfg, validate=validate)
File "/hy-tmp/ReDet/mmdet/apis/train.py", line 197, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/root/anaconda3/envs/redet/lib/python3.7/site-packages/mmcv-0.2.13-py3.7-linux-x86_64.egg/mmcv/runner/runner.py", line 358, in run
epoch_runner(data_loaders[i], **kwargs)
File "/root/anaconda3/envs/redet/lib/python3.7/site-packages/mmcv-0.2.13-py3.7-linux-x86_64.egg/mmcv/runner/runner.py", line 264, in train
self.model, data_batch, train_mode=True, **kwargs)
File "/hy-tmp/ReDet/mmdet/apis/train.py", line 39, in batch_processor
losses = model(**data)
File "/root/anaconda3/envs/redet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/root/anaconda3/envs/redet/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
return self.module(*inputs[0], **kwargs[0])
File "/root/anaconda3/envs/redet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/hy-tmp/ReDet/mmdet/models/detectors/base_new.py", line 95, in forward
return self.forward_train(img, img_meta, **kwargs)
File "/hy-tmp/ReDet/mmdet/models/detectors/ReDet.py", line 187, in forward_train
loss_bbox = self.bbox_head.loss(cls_score, bbox_pred, *rbbox_targets)
File "/hy-tmp/ReDet/mmdet/models/rbbox_heads/rbbox_head.py", line 161, in loss
cls_score, labels, label_weights, reduce=reduce)
File "/root/anaconda3/envs/redet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/hy-tmp/ReDet/mmdet/models/losses/cross_entropy_loss.py", line 27, in forward
cls_score, label, label_weight, *args, **kwargs)
TypeError: weighted_binary_cross_entropy() got an unexpected keyword argument 'reduce'
TypeError: weighted_binary_cross_entropy() got an unexpected keyword argument 'reduce'
翻看了其他的一些问题,好像没有遇到类似情况的,不知道哪一步出了问题