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

trouble in datsets create #53

Closed
biexiangduo opened this issue Aug 29, 2020 · 0 comments
Closed

trouble in datsets create #53

biexiangduo opened this issue Aug 29, 2020 · 0 comments

Comments

@biexiangduo
Copy link

biexiangduo commented Aug 29, 2020

Hi, I met problem in making datasets. I directly make segmentaion img by labelme ,and transfer segmentation img to 8 bit grayscale. data tree like following:
.
├── trainA
│   ├── 1.png
│   ├── 2.png
│   ├── 3.png
│   └── 4.png
├── trainA_seg
│   ├── 1.png
│   ├── 2.png
│   ├── 3.png
│   └── 4.png
├── trainB
│   ├── 1.png
│   ├── 2.png
│   ├── 3.png
│   └── 4.png
└── trainB_seg
├── 1.png
├── 2.png
├── 3.png
└── 4.png

the error:
verbose: False
----------------- End -------------------
dataset [UnalignedSegDataset] was created
#training images = 4
initialize network with normal
initialize network with normal
initialize network with normal
initialize network with normal
model [InstaGANModel] was created
---------- Networks initialized -------------
[Network G_A] Total number of parameters : 26.815 M
[Network G_B] Total number of parameters : 26.815 M
[Network D_A] Total number of parameters : 9.754 M
[Network D_B] Total number of parameters : 9.754 M

Setting up a new session...
create web directory ./checkpoints/_instagan/web...
Traceback (most recent call last):
File "train.py", line 24, in
for i, data in enumerate(dataset):
File "/home/pf/instagan/data/init.py", line 72, in iter
for i, data in enumerate(self.dataloader):
File "/home/pf/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 286, in next
return self._process_next_batch(batch)
File "/home/pf/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 307, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/pf/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 57, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/pf/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 57, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/pf/instagan/data/unaligned_seg_dataset.py", line 71, in getitem
A_segs = self.read_segs(A_seg_path, seed)
File "/home/pf/instagan/data/unaligned_seg_dataset.py", line 45, in read_segs
segs.append(-torch.ones(segs[0].size()))
IndexError: list index out of range

It seem the occur int dataloader, but I still don't know how to solve it?
could you help me?

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