add API demo from #1

Former-commit-id: c955edcef168da44257c5b50d7bc59266d909782
This commit is contained in:
hiyouga
2023-06-05 21:32:18 +08:00
parent a441a411cb
commit 5bedf2b21a
5 changed files with 191 additions and 178 deletions

View File

@@ -142,7 +142,7 @@ def load_valuehead_params(model: torch.nn.Module, checkpoint_dir: os.PathLike) -
def smooth(scalars: List[float], weight: Optional[float] = 0.9) -> List[float]:
"""
r"""
EMA implementation according to TensorBoard.
"""
last = scalars[0]