Giter Site home page Giter Site logo

Error occurred for jointtrain in GCGL about cglb HOT 3 CLOSED

 avatar commented on July 30, 2024
Error occurred for jointtrain in GCGL

from cglb.

Comments (3)

QueuQ avatar QueuQ commented on July 30, 2024

in the line 470 in CGLB/GCGL/pipeline.py, error occurred due to the wrong form of inputs

  for epoch in range(epochs):
        # Train
        if args['method'] == 'lwf':
            train_func(train_loader, loss_criterion, tid, args, prev_model)
        elif args['method'] == 'jointtrain':
            train_func(train_loader, loss_criterion, tid, args, train_loader_joint)
        else:
            train_func(train_loader, loss_criterion, tid, args)

The codes should be updated as below?

[1] the function observe_tskIL_multicls in GCGL/Baselines/jointtrain_model.py from def observe_tskIL_multicls(self, data_loader, loss_criterion, task_i, args, train_loader_joint): -> to def observe_tskIL_multicls(self, train_loader_joint, loss_criterion, task_i, args):

And

[2] in pipeline.py from train_func(train_loader, loss_criterion, tid, args, train_loader_joint) -> to train_func(train_loader_joint, loss_criterion, tid, args)

Hi, Thanks for your interest in our project!

Could please elaborate on what error did you meet? We tested the code again, but the code for joint-training runs well, and we don't quite understand why the code should be modified as you suggested. Do you mean that the argument data_loader in observe_tskIL_multicls of jointtrain is not used, so it should be removed to make the code more concise?

from cglb.

 avatar commented on July 30, 2024

The error was about the number of inputs in the argument. The argument data_loader in observe_clsIL does (# of input is 4) not match with the train_func(train_loader, loss_criterion, tid, args, train_loader_joint). The original code should work in observe_tskIL_multicls of jointtrain as you mensioned but not the other two functions such as observe and observe_tskIL_multicls.

from cglb.

QueuQ avatar QueuQ commented on July 30, 2024

The error was about the number of inputs in the argument. The argument data_loader in observe_clsIL does (# of input is 4) not match with the train_func(train_loader, loss_criterion, tid, args, train_loader_joint). The original code should work in observe_tskIL_multicls of jointtrain as you mensioned but not the other two functions such as observe and observe_tskIL_multicls.

Thanks for your further clarification! The code have been updated and the bug has been corrected.

Please note that the train_loader_joint is only used for task-IL scenario in the multi-class situation, while for the class-IL scenario, the train_loader for each task already contains all learnt task, which is realized in the class of GraphLevelDataset() in CGLB/GCGL/utils.py.

The reason of separately generating train_loader_joint is because when generating the train_set for class-IL in CGLB/GCGL/utils.py, the test_set also contain all learnt tasks for each task, which is undesired for task-IL scenario.

from cglb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.