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

how to gen train data? #4

Open
FantDing opened this issue Feb 4, 2018 · 1 comment
Open

how to gen train data? #4

FantDing opened this issue Feb 4, 2018 · 1 comment

Comments

@FantDing
Copy link

FantDing commented Feb 4, 2018

How to prepare training data? After I run python3 datagen.py, errors happens

Traceback (most recent call last):
  File "datagen.py", line 540, in <module>
    test()
  File "datagen.py", line 531, in test
    for images, loc_targets, cls_targets, mask_targets in dataloader:
  File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 310, in __iter__
    return DataLoaderIter(self)
  File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 180, in __init__
    self._put_indices()
  File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 219, in _put_indices
    indices = next(self.sample_iter, None)
  File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/sampler.py", line 119, in __iter__
    for idx in self.sampler:
  File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/sampler.py", line 50, in __iter__
    return iter(torch.randperm(len(self.data_source)).long())
RuntimeError: invalid argument 1: must be strictly positive at /pytorch/torch/lib/TH/generic/THTensorMath.c:2184

Thanks!

@HotaekHan
Copy link
Owner

HotaekHan commented Feb 5, 2018

hm.....well, It looks there are no data file in the path.
could you tell me how set the paramter for 'ListDataset' class?

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

2 participants