未验证 提交 243b4326 编写于 作者: Z zhiboniu 提交者: GitHub

update 2.0 public api in hapi (#32650)

上级 119cda3d
......@@ -12,17 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from . import logger
from . import callbacks
from . import model_summary
from . import hub
from . import logger # noqa: F401
from . import callbacks # noqa: F401
from . import hub # noqa: F401
from . import progressbar # noqa: F401
from . import static_flops # noqa: F401
from . import model
from .model import *
from .model_summary import summary
from .dynamic_flops import flops
from .model import Model # noqa: F401
from .model_summary import summary # noqa: F401
from .dynamic_flops import flops # noqa: F401
logger.setup_logger()
__all__ = ['callbacks'] + model.__all__ + ['summary']
__all__ = model.__all__ + ['flops']
__all__ = []
......@@ -18,7 +18,7 @@ import paddle.nn as nn
import numpy as np
from .static_flops import static_flops, Table
__all__ = ['flops']
__all__ = []
def flops(net, input_size, custom_ops=None, print_detail=False):
......
......@@ -19,6 +19,8 @@ import shutil
import zipfile
from paddle.utils.download import get_path_from_url
__all__ = []
DEFAULT_CACHE_DIR = '~/.cache'
VAR_DEPENDENCY = 'dependencies'
MODULE_HUBCONF = 'hubconf.py'
......
......@@ -22,6 +22,8 @@ import logging
from paddle.fluid.dygraph.parallel import ParallelEnv
__all__ = []
def setup_logger(output=None, name="hapi", log_level=logging.INFO):
"""
......
......@@ -54,7 +54,7 @@ from paddle.distributed.fleet.base import role_maker
from .callbacks import config_callbacks, EarlyStopping
from .model_summary import summary
__all__ = ['Model', ]
__all__ = []
_parallel_context_initialized = False
......
......@@ -22,7 +22,7 @@ from paddle.static import InputSpec
from collections import OrderedDict
__all__ = ['summary']
__all__ = []
def summary(net, input_size, dtypes=None):
......
......@@ -22,7 +22,7 @@ import time
import numpy as np
from collections import namedtuple
__all__ = ['ProgressBar']
__all__ = []
class ProgressBar(object):
......
......@@ -18,6 +18,8 @@ import paddle
from collections import OrderedDict
from paddle.static import Program, program_guard, Variable
__all__ = []
class VarWrapper(object):
def __init__(self, var, graph):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册