add API demo from #1

This commit is contained in:
hiyouga
2023-06-05 21:32:18 +08:00
parent 06e1b120e1
commit 3d8d5ee5d5
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]