“7711d78cb3fa81eea5137c103ec49c04f3bdd109”上不存在“develop/doc/dev/use_eigen_en.html”
提交 2820537f 编写于 作者: H Hui Zhang

fix load param

上级 a37192c8
...@@ -16,8 +16,8 @@ import json ...@@ -16,8 +16,8 @@ import json
import os import os
import re import re
from pathlib import Path from pathlib import Path
from typing import Union
from typing import Text from typing import Text
from typing import Union
import paddle import paddle
from paddle import distributed as dist from paddle import distributed as dist
...@@ -146,7 +146,7 @@ class Checkpoint(): ...@@ -146,7 +146,7 @@ class Checkpoint():
Returns: Returns:
configs (dict): epoch or step, lr and other meta info should be saved. 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") checkpoint_path, "checkpoint_latest")
def load_best_parameters(self, def load_best_parameters(self,
...@@ -166,7 +166,7 @@ class Checkpoint(): ...@@ -166,7 +166,7 @@ class Checkpoint():
Returns: Returns:
configs (dict): epoch or step, lr and other meta info should be saved. 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") checkpoint_path, "checkpoint_best")
def _should_save_best(self, metric: float) -> bool: 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.
先完成此消息的编辑!
想要评论请 注册