diff --git a/python/paddle/fluid/contrib/mixed_precision/__init__.py b/python/paddle/fluid/contrib/mixed_precision/__init__.py index c6296bcac93015c5f6c55861575a45a3a33b3628..a580ae5574c35bfc316a2ee3582fc5425145c2a1 100644 --- a/python/paddle/fluid/contrib/mixed_precision/__init__.py +++ b/python/paddle/fluid/contrib/mixed_precision/__init__.py @@ -13,9 +13,14 @@ # limitations under the License. from __future__ import print_function + from . import decorator 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__ += fp16_lists.__all__ +__all__ += fp16_utils.__all__ diff --git a/python/paddle/fluid/contrib/mixed_precision/fp16_utils.py b/python/paddle/fluid/contrib/mixed_precision/fp16_utils.py index 2f2f476a87554e717c2302192b0cf3eebb6932e2..c9a070a03a4b398a82c2179740ac602b07b4bcde 100644 --- a/python/paddle/fluid/contrib/mixed_precision/fp16_utils.py +++ b/python/paddle/fluid/contrib/mixed_precision/fp16_utils.py @@ -20,6 +20,9 @@ from ... import global_scope from ...log_helper import get_logger import logging import numpy as np + +__all__ = ["cast_model_to_fp16", "cast_parameters_to_fp16"] + _logger = get_logger( __name__, logging.INFO, fmt='%(asctime)s-%(levelname)s: %(message)s') diff --git a/python/paddle/static/amp/__init__.py b/python/paddle/static/amp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..604c7c3d2b4909214a7d71b58e377e5d74cb8f5b --- /dev/null +++ b/python/paddle/static/amp/__init__.py @@ -0,0 +1,18 @@ +# 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__