Git Product home page Git Product logo

lgl's Introduction

LGL

Lifelong Graph Learning

Chen Wang, Yuheng Qiu, Dasong Gao, Sebastian Scherer. "Lifelong Graph Learning." Conference on Computer Vision and Pattern Recognition (CVPR), 2022.

Note

This repo only contains source code for citation graphs.

Please go to Human Action Recognition and Feature Matching for other experiments.

Dependencies


Training

  • Citation datasets (Cora, Citeseer, and Pubmed) are automatically downloaded before training.

  • Default dataset (download) location is '/data/datasets', you may change it via args '--data-root [data_location]'.

      python train.py --data-root [data_location] --config config/Regular/FGNRegularCoraPubmed.yaml
    
  • To save your model during training

      python lifelong_data.py --data-root [data_location] --config config/Regular/FGNRegularCoraPubmed.yaml --save [model_file_location]
    
  • To try some baselined model under --model with GCN, GAT, MLP, SAGE and APP

      python lifelong_data.py --data-root [data_location] --config config/Regular/BaselineRegularCoraPubmed.yaml --save [model_file_location] --model [modle_name]
    

LifeLong Learning

  • Class-incremental Tasks

      python lifelong.py --data-root [data_location] --config config/ClassIncremental/FGNClassIncrementalCoraPubmed.yaml --save [model_file_location]
    
  • Data-incremental Tasks

      python lifelong_data.py --data-root [data_location] --config config/ --config config/DataIncremental/FGNDatalifelongCoraPubmed.yaml --save [model_file_location]
    

Testing

  • Download pretrained models. Change the path of the pretrained model under --load, and change the --config.

      python train.py --data-root [data_location] --config config/Regular/FGNRegularOGB.yaml --load pretrained_model/Regular/nonlifelongFGNKTransCat_ogbn-arxiv.pt
    

Some API for usage

    usage: lifelong.py [-h] [-c CONFIG] [--device DEVICE] [--data-root DATA_ROOT] [--dataset DATASET] [--model MODEL] [--load LOAD]
                    [--save SAVE] [--optm OPTM] [--lr LR] [--batch-size BATCH_SIZE] [--jump JUMP] [--iteration ITERATION]
                    [--memory-size MEMORY_SIZE] [--seed SEED] [-p] [--eval EVAL] [--sample-rate SAMPLE_RATE] [--k K]
                    [--hidden HIDDEN [HIDDEN ...]] [--drop DROP [DROP ...]] [--merge MERGE]

    optional arguments:
    -h, --help            show this help message and exit
    -c CONFIG, --config CONFIG
                            config file path
    --device DEVICE       cuda or cpu
    --data-root DATA_ROOT
                            dataset location
    --dataset DATASET     cora, citeseer, or pubmed
    --model MODEL         LGL or SAGE
    --load LOAD           load pretrained model file
    --save SAVE           model file to save
    --optm OPTM           SGD or Adam
    --lr LR               learning rate
    --batch-size BATCH_SIZE
                            minibatch size
    --jump JUMP           reply samples
    --iteration ITERATION
                            number of training iteration
    --memory-size MEMORY_SIZE
                            number of samples
    --seed SEED           Random seed.
    -p, --plot            increase output verbosity
    --eval EVAL           the path to eval the acc
    --sample-rate SAMPLE_RATE
                            sampling rate for test acc, if ogb datasets please set it to 200
    --k K                 the level of k hop.
    --hidden HIDDEN [HIDDEN ...]
    --drop DROP [DROP ...]
    --merge MERGE         Merge some class if needed.

Citation

    @inproceedings{wang2022lifelong,
      title={Lifelong graph learning},
      author={Wang, Chen and Qiu, Yuheng and Gao, Dasong and Scherer, Sebastian},
      booktitle={2022 Conference on Computer Vision and Pattern Recognition (CVPR)},
      year={2022}
    }

lgl's People

Contributors

haleqiu avatar nik-v9 avatar wang-chen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lgl's Issues

train lgl on cora error

python train.py --data-root /data/gcn_data/lgl_data --config config/Regular/FGNRegularCoraPubmed.yaml

image
image
image

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.