-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
67 lines (57 loc) · 1.61 KB
/
main.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import os
os.environ["CUDA_VISIBLE_DEVICES"] = '1'
from utils.args import get_args
from utils.training import train_il
import torch
def main():
args = get_args()
args.model = 'idpoc'
args.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
args.img_dir = 'img/idpoc/'
# seq-mnist
# args.dataset = 'seq-mnist'
# args.lr = 5e-4
# args.batch_size = 32
# args.n_epochs = 10
#
# args.nu = 0.99
# args.eta = 0.8
# args.eps = 1
# args.embedding_dim = 256
# args.weight_decay = 0.01
# args.nf = 64
# args.margin = 20
# seq-cifar10
args.dataset = 'seq-cifar10'
args.lr = 2e-3
args.batch_size = 32
args.n_epochs = 50
args.nu = 0.999 # singular value retention ate
args.eta = 10 # negative sample weight
args.eps = 1
args.embedding_dim = 1024
args.weight_decay = 1e-2
args.nf = 64
args.margin = 10 # r
# seq-tinyimg
# args.dataset = 'seq-tinyimg'
# args.lr = 5e-3
# args.batch_size = 64
# args.n_epochs = 100
#
# args.nu = 0.95
# args.eta = 1.5
# args.eps = 1
# args.embedding_dim = 1024
# args.weight_decay = 1e-4
# args.nf = 32
# args.margin = 10
for conf in [1]:
print("")
print("=================================================================")
print("==========================", "repeat", ":", conf, "==========================")
print("=================================================================")
print("")
train_il(args)
if __name__ == '__main__':
main()