WhoTHU / Adversarial_camou

24 stars 2 forks source link

执行test出错 #4

Open Francisapzii opened 9 months ago

Francisapzii commented 9 months ago
  1. 首先执行了train,执行成功; python train.py --nepoch 50 --save_path 'results/yolov3_07' --ctrl 50 --arch "yolov3" --seed_type variable --clamp_shift 0.01 --loss_type max_iou --seed_ratio 0.7
  2. 然后执行test: python train.py --device --checkpoint 50 --save_path 'results/yolov3_07' --ctrl 50 --arch "yolov3" --seed_type variable --clamp_shift 0.01 --seed_ratio 0.7 --test
  3. 上报如下错误: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 33/33 [29:38<00:00, 53.90s/it] Traceback (most recent call last): File "train.py", line 799, in np.savez(path, thetas=thetas, info=info) File "<__array_function__ internals>", line 200, in savez File "/work/anaconda3/envs/QHN/lib/python3.8/site-packages/numpy/lib/npyio.py", line 615, in savez _savez(file, args, kwds, False) File "/work/anaconda3/envs/QHN/lib/python3.8/site-packages/numpy/lib/npyio.py", line 716, in _savez val = np.asanyarray(val) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part.
WhoTHU commented 8 months ago

这个看起来可能是numpy版本的问题,看这个链接

jh-YY commented 8 months ago

@Francisapzii 您好,请问这个问题您解决了嘛,我也遇到了同样的问题