Skip to content

The train process error #2

@YangBo0411

Description

@YangBo0411

First of all, thank you for your outstanding work. When I was training, I encountered the following error:
Traceback (most recent call last):
File "train.py", line 18, in
fix_b = torch.stack([test_loader_b.dataset[i]['A'] for i in range(opt.display_size)]).cuda()
File "train.py", line 18, in
fix_b = torch.stack([test_loader_b.dataset[i]['A'] for i in range(opt.display_size)]).cuda()
File "E:\Github project\santa-main\data\single_dataset.py", line 33, in getitem
A_path = self.A_paths[index]
IndexError: list index out of range

The training command I used was ’python train.py --dataroot=datasets/multidataset --direction=AtoB --lambda_path=0.1 --tag=santa‘

There are four sub folders under the multidataset folder: trainA, trainB, testA, and testB. The images in the folder are unaligned.

Can you tell me what the problem is?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions