Skip to content

train IC-GAN with cifar10 #39

Description

@GalaBUAA

Hi,
I followed the instructions to extract the features from cifar10 as explained in "Other datasets". However, during the training process, the code reports the error:

Traceback (most recent call last):
File "run.py", line 47, in
trainer(config)
File "run.py", line 25, in call
run(config, "local_debug")
File "/mnt/ssd4/huzhaokun/ic_gan/BigGAN_PyTorch/trainer.py", line 78, in run
train(1, -1, config, None)
File "/mnt/ssd4/huzhaokun/ic_gan/BigGAN_PyTorch/trainer.py", line 436, in train
for i, batch in enumerate(pbar):
File "/mnt/ssd4/huzhaokun/ic_gan/BigGAN_PyTorch/utils.py", line 1368, in progress
for n, item in enumerate(items):
File "/mnt/ssd4/huzhaokun/anaconda3/envs/ic_gan_ddp_1.8.0/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 630, in next
data = self._next_data()
File "/mnt/ssd4/huzhaokun/anaconda3/envs/ic_gan_ddp_1.8.0/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1344, in _next_data
return self._process_data(data)
File "/mnt/ssd4/huzhaokun/anaconda3/envs/ic_gan_ddp_1.8.0/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1370, in _process_data
data.reraise()
File "/mnt/ssd4/huzhaokun/anaconda3/envs/ic_gan_ddp_1.8.0/lib/python3.8/site-packages/torch/_utils.py", line 706, in reraise
raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/mnt/ssd4/huzhaokun/anaconda3/envs/ic_gan_ddp_1.8.0/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 309, in _worker_loop
data = fetcher.fetch(index) # type: ignore[possibly-undefined]
File "/mnt/ssd4/huzhaokun/anaconda3/envs/ic_gan_ddp_1.8.0/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/mnt/ssd4/huzhaokun/anaconda3/envs/ic_gan_ddp_1.8.0/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 52, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/mnt/ssd4/huzhaokun/ic_gan/BigGAN_PyTorch/../data_utils/datasets_common.py", line 498, in getitem
img_nn, label_nn, feats, radii = self._get_instance_features_and_nn(index)
File "/mnt/ssd4/huzhaokun/ic_gan/BigGAN_PyTorch/../data_utils/datasets_common.py", line 823, in _get_instance_features_and_nn
feats = self.get_instance_features(idx_h)
File "/mnt/ssd4/huzhaokun/ic_gan/BigGAN_PyTorch/../data_utils/datasets_common.py", line 660, in get_instance_features
raise KeyError("feats_hflip not found in the dataset")
KeyError: 'feats_hflip not found in the dataset'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions