未验证 提交 6ba67969 编写于 作者: S Shuangchi He 提交者: GitHub

[CodeStyle][F401] remove unused imports in...

[CodeStyle][F401] remove unused imports in python_paddle/proto_onnx_optimizer_hapi_autograd_framework. (#46754)
上级 ab60fd8b
......@@ -14,7 +14,7 @@
from paddle.fluid import core
from paddle.fluid import framework
from paddle.fluid.backward import gradients_with_optimizer
from paddle.fluid.backward import gradients_with_optimizer # noqa: F401
import paddle
__all__ = []
......
......@@ -14,7 +14,6 @@
# TODO: define framework api
from paddle.fluid.layer_helper_base import LayerHelperBase
from paddle.fluid.data_feeder import convert_dtype
from paddle.fluid.framework import _dygraph_tracer
import numpy as np
from contextlib import contextmanager
......
......@@ -31,7 +31,7 @@ from paddle.fluid.io import _open_file_buffer, _is_file_path, _is_memory_buffer
from paddle.fluid.framework import Variable, _varbase_creator, _dygraph_tracer, _non_static_mode, ParamBase, EagerParamBase, _current_expected_place, Program
from paddle.fluid.dygraph.jit import _SaveLoadConfig
from paddle.fluid.dygraph.io import _construct_program_holders, _construct_params_and_buffers
from paddle.fluid.dygraph.io import INFER_MODEL_SUFFIX, INFER_PARAMS_SUFFIX, INFER_PARAMS_INFO_SUFFIX
from paddle.fluid.dygraph.io import INFER_MODEL_SUFFIX, INFER_PARAMS_SUFFIX
try:
from collections.abc import Iterable
except:
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import os
import re
import sys
import shutil
import zipfile
......
......@@ -25,7 +25,7 @@ import contextlib
import paddle
from paddle import fluid
from paddle.fluid import core
from paddle.fluid.framework import _non_static_mode, in_dygraph_mode
from paddle.fluid.framework import _non_static_mode
from paddle.fluid.framework import Variable
from paddle.fluid.framework import _get_paddle_place
from paddle.fluid.framework import _current_expected_place as _get_device
......
......@@ -12,11 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import copy
import numpy as np
import paddle
from collections import OrderedDict
from paddle.static import Program, program_guard, Variable
from paddle.static import Program, Variable
__all__ = []
......
......@@ -13,11 +13,9 @@
# limitations under the License.
from .optimizer import Optimizer
from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable, name_scope
from ..framework import in_dygraph_mode
from paddle import _C_ops, _legacy_C_ops
from paddle import _C_ops
from ..fluid.dygraph import no_grad
__all__ = []
......
......@@ -13,9 +13,7 @@
# limitations under the License.
from .optimizer import Optimizer
from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable
__all__ = []
......
......@@ -15,15 +15,13 @@
from .optimizer import Optimizer
from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable, _in_legacy_dygraph, in_dygraph_mode
from ..fluid.framework import Variable, in_dygraph_mode
from ..fluid import layers
from ..fluid import unique_name
from ..fluid.layer_helper import LayerHelper
import warnings
from ..fluid.dygraph import base as imperative_base
from collections import defaultdict
import numpy as np
import time
import paddle
from paddle import _C_ops, _legacy_C_ops
......
......@@ -13,9 +13,8 @@
# limitations under the License.
from .optimizer import Optimizer
from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable, name_scope
from ..fluid.framework import name_scope
from paddle import _C_ops, _legacy_C_ops
from ..fluid.dygraph import no_grad
......
......@@ -21,7 +21,6 @@ from ..fluid import unique_name
from ..fluid.layer_helper import LayerHelper
from paddle import _C_ops, _legacy_C_ops
from paddle.fluid.executor import global_scope
import paddle
__all__ = []
......
......@@ -17,11 +17,9 @@ import warnings
from .optimizer import Optimizer
from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable, name_scope
from ..fluid.layer_helper import LayerHelper
from ..fluid import unique_name
from ..fluid import layers
import paddle.fluid as fluid
from paddle.fluid.regularizer import L2DecayRegularizer
from paddle import _C_ops, _legacy_C_ops
import paddle
......
......@@ -13,32 +13,23 @@
# limitations under the License.
import numpy as np
import six
import logging
from collections import defaultdict
import paddle
from paddle.fluid.distribute_lookup_table import find_distributed_lookup_table
from paddle.fluid.framework import Program, Variable, name_scope, default_main_program, default_startup_program, device_guard
from paddle.fluid.framework import Variable, default_main_program, device_guard, name_scope
from ..fluid import framework
from ..fluid import layers
from ..fluid import unique_name
from ..fluid.backward import append_backward, _some_in_set_, _append_grad_suffix_, _get_no_grad_set_name
from ..fluid.clip import GradientClipBase, GradientClipByNorm, error_clip_callback, append_gradient_clip_ops
from ..fluid.backward import _get_no_grad_set_name, append_backward
from ..fluid.clip import GradientClipBase, append_gradient_clip_ops, error_clip_callback
from ..fluid.framework import program_guard, Parameter
from ..fluid.initializer import Constant
from ..fluid.layer_helper import LayerHelper
from ..fluid.layers import ops
from ..fluid.dygraph import base as imperative_base
from ..fluid.dygraph import no_grad
from paddle.fluid import core
from paddle.fluid.layers import tensor
from functools import reduce
from ..fluid.wrapped_decorator import signature_safe_contextmanager
from .. import compat as cpt
from .lr import LRScheduler
import copy
from paddle import _C_ops, _legacy_C_ops
from paddle.fluid.framework import _in_legacy_dygraph, _in_eager_without_dygraph_check, _current_expected_place, in_dygraph_mode
......
......@@ -13,9 +13,7 @@
# limitations under the License.
from .optimizer import Optimizer
from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable
__all__ = []
......
......@@ -15,7 +15,6 @@
from .optimizer import Optimizer
from ..fluid import core
from ..fluid import framework
from ..fluid.framework import Variable, name_scope
from ..fluid.dygraph import no_grad
from paddle import _C_ops, _legacy_C_ops
import warnings
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册