---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-108-f79c83f96974> in <module>
----> 1 x, local_rate, background = next(iter(decode_dl))
2 plot_3d_projections(local_rate[0,0], 'max')
3 plot_3d_projections(x[0,0], 'max')
~/anaconda3/envs/decode2_dev/lib/python3.7/site-packages/torch/utils/data/dataloader.py in __next__(self)
433 if self._sampler_iter is None:
434 self._reset()
--> 435 data = self._next_data()
436 self._num_yielded += 1
437 if self._dataset_kind == _DatasetKind.Iterable and \
~/anaconda3/envs/decode2_dev/lib/python3.7/site-packages/torch/utils/data/dataloader.py in _next_data(self)
473 def _next_data(self):
474 index = self._next_index() # may raise StopIteration
--> 475 data = self._dataset_fetcher.fetch(index) # may raise StopIteration
476 if self._pin_memory:
477 data = _utils.pin_memory.pin_memory(data)
~/anaconda3/envs/decode2_dev/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py in fetch(self, possibly_batched_index)
42 def fetch(self, possibly_batched_index):
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
46 data = self.dataset[possibly_batched_index]
~/anaconda3/envs/decode2_dev/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py in <listcomp>(.0)
42 def fetch(self, possibly_batched_index):
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
46 data = self.dataset[possibly_batched_index]
<ipython-input-3-cee7f00a2963> in __getitem__(self, _)
34
35 def __getitem__(self, _):
---> 36 i = random.randint(0,len(self.volumes)-1)
37 x = self.volumes[i]
38 x = self._compose(x, self.dataset_tfms)
~/anaconda3/envs/decode2_dev/lib/python3.7/random.py in randint(self, a, b)
220 """
221
--> 222 return self.randrange(a, b+1)
223
224 def _randbelow(self, n, int=int, maxsize=1<<BPF, type=type,
~/anaconda3/envs/decode2_dev/lib/python3.7/random.py in randrange(self, start, stop, step, _int)
198 return istart + self._randbelow(width)
199 if step == 1:
--> 200 raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
201
202 # Non-unit step argument supplied.
ValueError: empty range for randrange() (0,0, 0)