razvancaramalau / Sequential-GCN-for-Active-Learning

51 stars 17 forks source link

Coreset method error #1

Closed jaesunghwang closed 3 years ago

jaesunghwang commented 3 years ago

Hi, i tried to reproduce your code, but i have error when i use "CoreSet" like below. already i tried 'Random' and 'UncertainGCN' are fine(No error) could you check my error message like below and how to fix?

=================================================================== (sgcn) jaesunghwang@snu-aril-1:~/Sequential-GCN-for-Active-Learning$ python main.py -m CoreSet -d cifar10 -c 5 Dataset: cifar10 Method type:CoreSet Files already downloaded and verified Files already downloaded and verified Files already downloaded and verified

Train a Model. Finished.
Trial 1/5 || Cycle 1/5 || Label set size 1000: Test acc 33.51 Traceback (most recent call last): File "main.py", line 142, in arg = query_samples(models, method, data_unlabeled, subset, labeled_set, cycle, args) File "/home/jaesunghwang/Sequential-GCN-for-Active-Learning/selection_methods.py", line 279, in query_samples arg = get_kcg(models, ADDENDUM*(cycle+1), unlabeled_loader) UnboundLocalError: local variable 'models' referenced before assignment

razvancaramalau commented 3 years ago

it should be fixed now. Thanks for pointing out. Soon I'll release a more recent update that includes some other datasets.