donnyyou/torchcv

AssertionError: <class 'torch.Tensor'>

yangninghua opened this issue · 1 comments

2019-10-12 13:36:13,632 INFO [runner_helper.py, 63] Resuming from ./checkpoints/seg/cityscapes/fs_deeplabv3_cityscapes_segtag_latest.pth
2019-10-12 13:36:15,737 INFO [controller.py, 67] Testing start...
Traceback (most recent call last):
File "main.py", line 186, in
Controller.test(runner)
File "/home/spple/paddle/DeepGlint/torchcv/runner/tools/controller.py", line 79, in test
runner.test(test_dir, out_dir)
File "/home/spple/paddle/DeepGlint/torchcv/runner/seg/fcn_segmentor_test.py", line 48, in test
total_logits = self.ss_test(data_dict)
File "/home/spple/paddle/DeepGlint/torchcv/runner/seg/fcn_segmentor_test.py", line 85, in ss_test
data_dict = self.blob_helper.get_blob(in_data_dict, scale=1.0)
File "/home/spple/paddle/DeepGlint/torchcv/runner/tools/blob_helper.py", line 25, in get_blob
for image, meta in zip(DCHelper.tolist(data_dict['img']), DCHelper.tolist(data_dict['meta'])):
File "/home/spple/paddle/DeepGlint/torchcv/tools/helper/dc_helper.py", line 19, in tolist
assert isinstance(dc, DataContainer), type(dc)
AssertionError: <class 'torch.Tensor'>
2019-10-12 13:36:17,599 INFO [seg_evaluator.py, 51] Evaluate 0 images
/home/spple/paddle/DeepGlint/torchcv/metric/seg/seg_running_score.py:37: RuntimeWarning: invalid value encountered in double_scalars
acc = np.diag(hist).sum() / hist.sum()
/home/spple/paddle/DeepGlint/torchcv/metric/seg/seg_running_score.py:38: RuntimeWarning: invalid value encountered in true_divide
acc_cls = np.diag(hist) / hist.sum(axis=1)
/home/spple/paddle/DeepGlint/torchcv/metric/seg/seg_running_score.py:39: RuntimeWarning: Mean of empty slice
acc_cls = np.nanmean(acc_cls)
/home/spple/paddle/DeepGlint/torchcv/metric/seg/seg_running_score.py:40: RuntimeWarning: invalid value encountered in true_divide
iu = np.diag(hist) / (hist.sum(axis=1) + hist.sum(axis=0) - np.diag(hist))
/home/spple/paddle/DeepGlint/torchcv/metric/seg/seg_running_score.py:41: RuntimeWarning: Mean of empty slice
mean_iu = np.nanmean(iu)
/home/spple/paddle/DeepGlint/torchcv/metric/seg/seg_running_score.py:42: RuntimeWarning: invalid value encountered in true_divide
freq = hist.sum(axis=1) / hist.sum()
/home/spple/paddle/DeepGlint/torchcv/metric/seg/seg_running_score.py:43: RuntimeWarning: invalid value encountered in greater
fwavacc = (freq[freq > 0] * iu[freq > 0]).sum()
2019-10-12 13:36:17,641 INFO [seg_evaluator.py, 52] Class mIOU: {0: nan, 1: nan, 2: nan, 3: nan, 4: nan, 5: nan, 6: nan, 7: nan, 8: nan, 9: nan, 10: nan, 11: nan, 12: nan, 13: nan, 14: nan, 15: nan, 16: nan, 17: nan, 18: nan}
2019-10-12 13:36:17,642 INFO [seg_evaluator.py, 53] mIOU: nan
2019-10-12 13:36:17,643 INFO [seg_evaluator.py, 54] Pixel ACC: nan

for image, meta in zip(DCHelper.tolist(data_dict['img']), DCHelper.tolist(data_dict['meta'])):