提交 2820537f 编写于 作者: H Hui Zhang

fix load param

上级 a37192c8
......@@ -16,8 +16,8 @@ import json
import os
import re
from pathlib import Path
from typing import Union
from typing import Text
from typing import Union
import paddle
from paddle import distributed as dist
......@@ -146,7 +146,7 @@ class Checkpoint():
Returns:
configs (dict): epoch or step, lr and other meta info should be saved.
"""
return self._load_parameters(model, optimizer, checkpoint_dir,
return self.load_parameters(model, optimizer, checkpoint_dir,
checkpoint_path, "checkpoint_latest")
def load_best_parameters(self,
......@@ -166,7 +166,7 @@ class Checkpoint():
Returns:
configs (dict): epoch or step, lr and other meta info should be saved.
"""
return self._load_parameters(model, optimizer, checkpoint_dir,
return self.load_parameters(model, optimizer, checkpoint_dir,
checkpoint_path, "checkpoint_best")
def _should_save_best(self, metric: float) -> bool:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册