-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
112 lines (96 loc) · 3.02 KB
/
config.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import os
from copy import deepcopy
__mlp_config = {
'device': 'cuda',
'policy_class': 'mlp',
'ckpt_dir': os.path.join(os.path.dirname(__file__), 'models/mlp'),
'pretrained': True,
'pretrained_ckpt': r'./models/mlp/policy_epoch_100_seed_0.ckpt',
'task_name': 'nazuchi_beach_friendship',
'batch_size': 20,
'seed': 0,
'num_epochs': 2000,
'lr': 1e-4,
# mlp 目前参数量在config里面没法调,都是写死的
# 实际没用
'kl_weight': 100,
'chunk_size': 20,
'hidden_dim': 64,
'dim_feedforward': 1280,
'lr_backbone': 1e-5,
'backbone': 'resnet18',
}
__act_config = {
'device': 'cuda',
'policy_class': 'act', # 'mlp' or 'act for now
'ckpt_dir': os.path.join(os.path.dirname(__file__), 'models/act_nz2_after5k'),
'pretrained': True,
'pretrained_ckpt': r'./models/act_nz2_after4k/policy_epoch_1100_seed_114514.ckpt',
'task_name': 'nz2',
'batch_size': 8,
'seed': 114514,
'num_epochs': 4000,
'lr': 1e-4,
'kl_weight': 100,
'chunk_size': 40,
'hidden_dim': 640,
'dim_feedforward': 1280,
'lr_backbone': 1e-5,
'backbone': 'resnet18',
}
__act_small_config = {
'device': 'cuda',
'policy_class': 'act', # 'mlp' or 'act for now
'ckpt_dir': os.path.join(os.path.dirname(__file__), 'models/act_100l1_small'),
'pretrained': True,
'pretrained_ckpt': r'./models/act_100l1_small/policy_epoch_300_seed_0.ckpt',
'task_name': 'nazuchi_beach_friendship',
'batch_size': 16,
'seed': 0,
'num_epochs': 3000,
'lr': 1e-4,
'kl_weight': 100,
'chunk_size': 40,
'hidden_dim': 320,
'dim_feedforward': 640,
'lr_backbone': 1e-5,
'backbone': 'resnet18',
}
__mlp_infer_config = {**__mlp_config, **{
'seed': 1000,
'ckpt_name': 'policy_best.ckpt',
'temporal_agg': True,
# 'onscreen_render': True,
# 'save_video': True,
'video_dir': os.path.join(os.path.dirname(__file__), 'video/mlp'),
}}
__act_infer_config = {**__act_config, **{
'ckpt_dir': os.path.join(os.path.dirname(__file__), 'models/act_nz2_after5k'),
'seed': 1000,
'ckpt_name': 'policy_best.ckpt',
# 'ckpt_name': 'policy_epoch_2300_seed_0.ckpt',
'temporal_agg': False,
'onscreen_render': True,
'save_video': True,
'real_GI': True,
'video_dir': os.path.join(os.path.dirname(__file__), 'video/act'),
}}
__act_small_infer_config = {**__act_small_config, **{
'ckpt_dir': os.path.join(os.path.dirname(__file__), 'models/act_100l1_small'),
'seed': 1000,
'ckpt_name': 'policy_best.ckpt',
'temporal_agg': True,
# 'onscreen_render': True,
# 'save_video': True,
'video_dir': os.path.join(os.path.dirname(__file__), 'video/act_small'),
}}
configs = {
'mlp': __mlp_config,
'act': __act_config,
'act_small': __act_small_config,
}
infer_configs = {
'mlp': __mlp_infer_config,
'act': __act_infer_config,
'act_small': __act_small_infer_config,
}