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

some issues when running the phase2.py on CIFAR-100 #1

Open
Pengfight opened this issue Sep 26, 2021 · 1 comment
Open

some issues when running the phase2.py on CIFAR-100 #1

Pengfight opened this issue Sep 26, 2021 · 1 comment

Comments

@Pengfight
Copy link

When I run the phase2.py on CIFAR-100, the error happened.

Traceback (most recent call last):
  File "phase2.py", line 287, in <module>
    result = train_and_eval(args.tag, args.dataroot, resume=args.resume, save_path=args.save, only_eval=args.only_eval, unsupervised=args.unsupervised, devices=args.gpu)
  File "phase2.py", line 140, in train_and_eval
    trainloader, unsuploader, testloader = get_dataloaders(C.get()['dataset'], C.get()['batch'], C.get()['batch_unsup'], 
  File "/home/cuipeng/cores/phase2/data.py", line 156, in get_dataloaders
    sampler=StratifiedSampler(trainset.targets), drop_last=True)
AttributeError: 'Subset' object has no attribute 'targets'
@haochenglouis
Copy link
Owner

The problem may come from Line 133 in phase2.py. I think you did not input the correct path of 'unsup_idx'.

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