Traceback (most recent call last):
File "demo_coco_gcn.py", line 76, in <module>
main_coco()
File "demo_coco_gcn.py", line 73, in main_coco
engine.learning(model, criterion, train_dataset, val_dataset, optimizer)
File "/userhome/gyt/ML-GCN/engine.py", line 202, in learning
self.train(train_loader, model, criterion, optimizer, epoch)
File "/userhome/gyt/ML-GCN/engine.py", line 253, in train
self.on_end_epoch(True, model, criterion, data_loader, optimizer)
File "/userhome/gyt/ML-GCN/engine.py", line 335, in on_end_epoch
map = 100 * self.state['ap_meter'].value().mean()
File "/userhome/gyt/ML-GCN/util.py", line 225, in value
ap[k] = AveragePrecisionMeter.average_precision(scores, targets, self.difficult_examples)
File "/userhome/gyt/ML-GCN/util.py", line 251, in average_precision
precision_at_i /= pos_count
ZeroDivisionError: float division by zero
当把数据的标签改为119×119之后,train.sh遇到上述问题,原因可能是prectision的准确率太低,导致计算AP的时候pos_count=0.
|