peikexin9/deepxplore

IndexError: list index out of range

rajasekharponakala opened this issue · 0 comments

Hi Pei!,

I'm using below environment for code execution:
OS: Debian GNU/Linux (sid)
Tensorflow, Keras installed, and working well.

After setting up the environment, this IndexError is keep on getting. But the random.choice is considered to take the 'img_paths' as list, then i don't know why.. could you help. Below is the Traceback verbose. I Issued python gen_diff.py occl 1 0.1 10 1 50 0 in the ImageNet folder.

Traceback (most recent call last): File "gen_diff.py", line 55, in <module> gen_img = preprocess_image(random.choice(img_paths)) File "/usr/lib/python2.7/random.py", line 277, in choice return seq[int(self.random() * len(seq))] # raises IndexError if seq is empty IndexError: list index out of range