-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (30 loc) · 856 Bytes
/
Copy pathmain.py
File metadata and controls
34 lines (30 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# import torch
import time
from configuration import config
from datasets import *
from methods.er_baseline import ER
from methods.clib import CLIB
from methods.rainbow_memory import RM
from methods.finetuning import FT
from methods.ewcpp import EWCpp
from methods.lwf import LwF
from methods.mvp import MVP
from methods.mvp_shift import MVPShift
# torch.backends.cudnn.enabled = False
methods = { "er" : ER,
"clib" : CLIB,
"rm" : RM,
"lwf" : LwF,
"Finetuning" :FT,
"ewc++" : EWCpp,
"mvp" : MVP,
"mvp_shift": MVPShift,
}
def main():
# Get Configurations
args = config.base_parser()
print(args)
trainer = methods[args.mode](**vars(args))
trainer.run()
if __name__ == "__main__":
main()