代码是:
parser.add_argument('score_files', nargs='+', type=str)
score_npz_files = [np.load(x) for x in args.score_files]
print('score_npz_files:',score_npz_files)
score_list = [x['scores'][:, 0] for x in score_npz_files]
label_list = [x['labels'] for x in score_npz_files]
我输入:
python tools/eval_scores.py ucf101_bninception__rgb_checkpoint.pth.tar ucf101_bninception__flow_checkpoint.pth.tar --score_weights 1 1.5
和打印:
score_npz_files: [119547037146038801333356, 119547037146038801333356]
<类“列表”> (2,)
错误:
回溯(最近一次调用最后一次): 文件“tools/eval_scores.py”,第 33 行,在 score_list = [x['scores'][:, 0] for x in score_npz_files] 类型错误:“int”对象不可下标
我正在做 TSN,但出现此错误。我不知道如何处理?您能帮帮我吗?非常感谢!!