feat: implement dynamic threshold scheduling for GraphMixer

This commit is contained in:
gameloader
2025-09-12 17:02:42 +08:00
parent 6a1f9d30f3
commit 172328a4e6
4 changed files with 105 additions and 41 deletions

View File

@ -54,6 +54,10 @@ class Model(nn.Module):
# GraphMixer相关非归一化
k_graph=getattr(configs, 'k_graph', 8), # -> max_degree
thr_graph=getattr(configs, 'thr_graph', 0.5),
thr_graph_min=getattr(configs, 'thr_graph_min', None),
thr_graph_max=getattr(configs, 'thr_graph_max', None),
thr_graph_steps=getattr(configs, 'thr_graph_steps', 0),
thr_graph_schedule=getattr(configs, 'thr_graph_schedule', 'linear'),
symmetric_graph=getattr(configs, 'symmetric_graph', True),
degree_rescale=getattr(configs, 'degree_rescale', 'count-sqrt'), # 'none' | 'count' | 'count-sqrt' | 'sum'
gate_temperature=getattr(configs, 'gate_temperature', 2.0/3.0),