Repository: mlcommons/inference
Issue: IndexError: index -1 is out of bounds for axis 0 with size 0
Root cause: Validation Gap

Hi,

**When I ran resnet50 with cmd "python3.6 python/main.py --profile resnet50-tf --mlperf_conf ../../mlperf.conf --model ../../../resnet50.pb --dataset-path fake_imagenet/ --output /home/jason/resnet50/inference/vision/classification_and_detection/output/test1   --scenario=Offline"

There are error logs blow:**

ERROR:main:thread: failed on contentid=['fake_imagenet/val/800px-Porsche_991_silver_IAA.jpg', 'fake_imagenet/val/800px-20180630_Tesla_Model_S_70D_2015_midnight_blue_left_front.jpg', 'fake_imagenet/val/782px-Pumiforme.JPG', 'fake_imagenet/val/800px-Welsh_Springer_Spaniel.jpg', 'fake_imagenet/val/800px-Sardinian_Warbler.jpg', 'fake_imagenet/val/800px-7weeks_old.JPG', 'fake_imagenet/val/512px-Cacatua_moluccensis_-Cincinnati_Zoo-8a.jpg', 'fake_imagenet/val/800px-Jammlich_crop.jpg', 'fake_imagenet/val/800px-Porsche_991_silver_IAA.jpg', 'fake_imagenet/val/800px-20180630_Tesla_Model_S_70D_2015_midnight_blue_left_front.jpg', 'fake_imagenet/val/782px-Pumiforme.JPG', 'fake_imagenet/val/800px-Welsh_Springer_Spaniel.jpg', 'fake_imagenet/val/800px-Sardinian_Warbler.jpg', 'fake_imagenet/val/800px-7weeks_old.JPG', 'fake_imagenet/val/512px-Cacatua_moluccensis_-Cincinnati_Zoo-8a.jpg', 'fake_imagenet/val/800px-Jammlich_crop.jpg', 'fake_imagenet/val/800px-Porsche_991_silver_IAA.jpg', 'fake_imagenet/val/800px-20180630_Tesla_Model_S_70D_2015_midnight_blue_left_front.jpg', 'fake_imagenet/val/782px-Pumiforme.JPG', 'fake_imagenet/val/800px-Welsh_Springer_Spaniel.jpg', 'fake_imagenet/val/800px-Sardinian_Warbler.jpg', 'fake_imagenet/val/800px-7weeks_old.JPG', 'fake_imagenet/val/512px-Cacatua_moluccensis_-Cincinnati_Zoo-8a.jpg', 'fake_imagenet/val/800px-Jammlich_crop.jpg', 'fake_imagenet/val/800px-Porsche_991_silver_IAA.jpg', 'fake_imagenet/val/800px-20180630_Tesla_Model_S_70D_2015_midnight_blue_left_front.jpg', 'fake_imagenet/val/782px-Pumiforme.JPG', 'fake_imagenet/val/800px-Welsh_Springer_Spaniel.jpg', 'fake_imagenet/val/800px-Sardinian_Warbler.jpg', 'fake_imagenet/val/800px-7weeks_old.JPG', 'fake_imagenet/val/512px-Cacatua_moluccensis_-Cincinnati_Zoo-8a.jpg', 'fake_imagenet/val/800px-Jammlich_crop.jpg'], The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

**And finally output this error:**
Traceback (most recent call last):
  File "/home/jason/resnet152/inference/vision/classification_and_detection/python/main.py", line 596, in <module>
    main()
  File "/home/jason/resnet152/inference/vision/classification_and_detection/python/main.py", line 580, in main
    add_results(final_results, "{}".format(scenario),
  File "/home/jason/resnet152/inference/vision/classification_and_detection/python/main.py", line 414, in add_results
    buckets = np.percentile(result_list, percentiles).tolist()
  File "<__array_function__ internals>", line 5, in percentile
  File "/root/anaconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 3867, in percentile
    return _quantile_unchecked(
  File "/root/anaconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 3986, in _quantile_unchecked
    r, k = _ureduce(a, func=_quantile_ureduce_func, q=q, axis=axis, out=out,
  File "/root/anaconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 3564, in _ureduce
    r = func(a, **kwargs)
  File "/root/anaconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4098, in _quantile_ureduce_func
    n = np.isnan(ap[-1])
IndexError: index -1 is out of bounds for axis 0 with size 0

**The dataset is using fake data which is generated by tools/make_fake_data.sh**

Could you help me with that issue? Thanks.



Not relevant anymore, closing issue