feat: initial HSAP platform

Huaxu Sentinel Active Safety Platform with embedded algorithm code,
Docker Compose setup, and vendored dataset scaffolds for clone-and-run.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-25 16:59:59 +08:00
commit 7c43b44c57
1619 changed files with 373355 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import torch
import math
def build_scheduler(cfg, optimizer):
cfg_cp = cfg.scheduler.copy()
cfg_type = cfg_cp.pop('type')
if cfg_type not in dir(torch.optim.lr_scheduler):
raise ValueError("{} is not defined.".format(cfg_type))
_scheduler = getattr(torch.optim.lr_scheduler, cfg_type)
return _scheduler(optimizer, **cfg_cp)