I only put the following code Sequential-GCN-for-Active-Learning/main.py at master · razvancaramalau/Sequential-GCN-for-Active-Learning · GitHub
in a class but the criterion argument in test() is giving me error NameError: name ‘criterion’ is not defined. Any solution for resolving this particular argument?
whereas ‘criterion’ is defined here Sequential-GCN-for-Active-Learning/train_test.py at master · razvancaramalau/Sequential-GCN-for-Active-Learning · GitHub
from train_test import train, test

class Objective:
    def __init__(self):
    self.args = parser.parse_args()
    
    def __call__(self, optuna_trial):
    train(models, method, criterion, optimizers, schedulers, dataloaders, args.no_of_epochs, EPOCHL)

    results.close()
    return acc

if __name__ == '__main__':