vikasverma1077/ICT

AttributeError: 'CIFAR10' object has no attribute 'train_labels'

Closed this issue · 2 comments

IdoBl commented

Hi,
Thank you for your impressive work.
When I try to run the code with CIFAR-10 I am getting this error:

line 244, in load_data_subset
    train_sampler, valid_sampler, unlabelled_sampler = get_sampler(train_data.train_labels, labels_per_class, valid_labels_per_class)
AttributeError: 'CIFAR10' object has no attribute 'train_labels'

Any idea how to solve the problem?
Thanks,
Ido

it is a pytorch version issue. train_data.targets should work with your version.

IdoBl commented

Thanks