未验证 提交 c05170d3 编写于 作者: H huangxu96 提交者: GitHub

add alias for fluid.contrib.mixed_precision (#29562)

* add alias for fluid.contrib.mixed_precision
上级 fb6697b4
...@@ -13,9 +13,14 @@ ...@@ -13,9 +13,14 @@
# limitations under the License. # limitations under the License.
from __future__ import print_function from __future__ import print_function
from . import decorator from . import decorator
from .decorator import * from .decorator import *
from .fp16_lists import AutoMixedPrecisionLists from . import fp16_lists
from .fp16_lists import *
from . import fp16_utils
from .fp16_utils import *
__all__ = decorator.__all__ __all__ = decorator.__all__
__all__ += fp16_lists.__all__ __all__ += fp16_lists.__all__
__all__ += fp16_utils.__all__
...@@ -20,6 +20,9 @@ from ... import global_scope ...@@ -20,6 +20,9 @@ from ... import global_scope
from ...log_helper import get_logger from ...log_helper import get_logger
import logging import logging
import numpy as np import numpy as np
__all__ = ["cast_model_to_fp16", "cast_parameters_to_fp16"]
_logger = get_logger( _logger = get_logger(
__name__, logging.INFO, fmt='%(asctime)s-%(levelname)s: %(message)s') __name__, logging.INFO, fmt='%(asctime)s-%(levelname)s: %(message)s')
......
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from ...fluid.contrib import mixed_precision
from ...fluid.contrib.mixed_precision import *
__all__ = mixed_precision.__all__
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册