Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda error while Train Detection Model #24

Open
stefanhahmann opened this issue Sep 5, 2023 · 0 comments
Open

Conda error while Train Detection Model #24

stefanhahmann opened this issue Sep 5, 2023 · 0 comments

Comments

@stefanhahmann
Copy link

We tested Elephant with our own data. When trying to train a detection model the following error message occured on the server:

Task apis.seg.train_seg_task[c45c4188-a82e-4f5a-a87e-176c60acedb9] raised unexpected: ValueError('empty range for randrange() (144,98, -46)')
Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/celery/app/trace.py", line 405, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/app/main.py", line 48, in __call__
    return self.run(*args, **kwargs)
  File "/app/apis/seg.py", line 101, in train_seg_task
    memmap_dir, input_size)
  File "/opt/conda/lib/python3.7/site-packages/elephant/common.py", line 165, in run_train_seg
    is_cpu=is_cpu, is_mixed_precision=is_mixed_precision)
  File "/opt/conda/lib/python3.7/site-packages/elephant/common.py", line 329, in run_train
    for batch_id, ((x, keep_axials), y) in enumerate(loader):
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 561, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/lib/python3.7/site-packages/elephant/datasets.py", line 621, in __getitem__
    return super()._generate_item(img_input, img_label, self.crop_size)
  File "/opt/conda/lib/python3.7/site-packages/elephant/datasets.py", line 310, in _generate_item
    for i in range(self.n_dims)
  File "/opt/conda/lib/python3.7/site-packages/elephant/datasets.py", line 310, in <listcomp>
    for i in range(self.n_dims)
  File "/opt/conda/lib/python3.7/random.py", line 222, in randint
    return self.randrange(a, b+1)
  File "/opt/conda/lib/python3.7/random.py", line 200, in randrange
    raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (144,98, -46)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant