Hi, I am trying to run the code and I keep getting this error below in graf-main/graf/utils.py
File "/home/sourav-insight/mednerf/graf-main/graf/utils.py", line 45, in InfiniteSampler yield order[i] IndexError: index -1 is out of bounds for axis 0 with size 0
Can someone help me with this? This is the full error code below.
Traceback (most recent call last): File "train.py", line 139, in <module> x_real = get_nsamples(train_loader, ntest) File "/home/sourav-insight/mednerf/graf-main/graf/utils.py", line 67, in get_nsamples x_next = next(data_loader) File "/home/sourav-insight/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in __next__ data = self._next_data() File "/home/sourav-insight/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 560, in _next_data index = self._next_index() # may raise StopIteration File "/home/sourav-insight/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 512, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/home/sourav-insight/.local/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 226, in __iter__ for idx in self.sampler: File "/home/sourav-insight/mednerf/graf-main/graf/utils.py", line 45, in InfiniteSampler yield order[i] IndexError: index -1 is out of bounds for axis 0 with size 0
Hi, I am trying to run the code and I keep getting this error below in graf-main/graf/utils.py
File "/home/sourav-insight/mednerf/graf-main/graf/utils.py", line 45, in InfiniteSampler yield order[i] IndexError: index -1 is out of bounds for axis 0 with size 0
Can someone help me with this? This is the full error code below.
Traceback (most recent call last): File "train.py", line 139, in <module> x_real = get_nsamples(train_loader, ntest) File "/home/sourav-insight/mednerf/graf-main/graf/utils.py", line 67, in get_nsamples x_next = next(data_loader) File "/home/sourav-insight/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in __next__ data = self._next_data() File "/home/sourav-insight/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 560, in _next_data index = self._next_index() # may raise StopIteration File "/home/sourav-insight/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 512, in _next_index return next(self._sampler_iter) # may raise StopIteration File "/home/sourav-insight/.local/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 226, in __iter__ for idx in self.sampler: File "/home/sourav-insight/mednerf/graf-main/graf/utils.py", line 45, in InfiniteSampler yield order[i] IndexError: index -1 is out of bounds for axis 0 with size 0