未验证 提交 6977df8c 编写于 作者: S Shuangchi He 提交者: GitHub

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

[CodeStyle][F401] remove unused imports in python_paddle/inference_device_profiler_text_metric_incubate_quantization_libs_audio_amp_jit. (#46762)
上级 df6dcf17
...@@ -12,5 +12,5 @@ ...@@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from paddle.fluid.core import CUDAStream as Stream from paddle.fluid.core import CUDAStream as Stream # noqa: F401
from paddle.fluid.core import CUDAEvent as Event from paddle.fluid.core import CUDAEvent as Event # noqa: F401
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import functools
import typing import typing
import paddle import paddle
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import functools
class Registry(object): class Registry(object):
""" A general registry object. """ """ A general registry object. """
......
...@@ -20,15 +20,15 @@ import paddle ...@@ -20,15 +20,15 @@ import paddle
from . import primops from . import primops
from .primops import (add, broadcast, concat, cos, div, eq, erf, exp, from .primops import (add, broadcast, concat, cos, div, eq, erf, exp,
fill_const, gather, ge, gt, log, matmul, max, mul, ne, fill_const, gather, ge, gt, log, matmul, mul, ne, neg,
neg, reduce_sum, reshape, scatter_add, select, set_value, reduce_sum, reshape, scatter_add, select, set_value, sin,
sin, slice_assign, slice_select, split, sqrt, sub, tanh, slice_assign, slice_select, split, sqrt, sub, tanh,
transpose, bernoulli, rsqrt) transpose, bernoulli, rsqrt)
from .primreg import (REGISTER_JVP, REGISTER_ORIG2PRIM, REGISTER_PRIM2ORIG, from .primreg import (REGISTER_JVP, REGISTER_ORIG2PRIM, REGISTER_PRIM2ORIG,
REGISTER_TRANSPOSE, lookup_fn, lookup_jvp, REGISTER_TRANSPOSE, lookup_fn, lookup_jvp,
lookup_orig2prim, lookup_prim2orig, lookup_transpose, lookup_orig2prim, lookup_prim2orig, lookup_transpose,
op_position_inputs, op_position_output) op_position_inputs, op_position_output)
from .utils import INT_DTYPE_2_STRING, get_input_var_list, get_output_var_list from .utils import INT_DTYPE_2_STRING, get_output_var_list
from paddle.fluid.data_feeder import convert_dtype from paddle.fluid.data_feeder import convert_dtype
from paddle.fluid.framework import convert_np_dtype_to_dtype_ from paddle.fluid.framework import convert_np_dtype_to_dtype_
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
import math import math
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
import numpy as np
from .naive_gate import NaiveGate from .naive_gate import NaiveGate
from ..utils import limit_by_capacity from ..utils import limit_by_capacity
......
...@@ -23,7 +23,6 @@ from .base_gate import BaseGate ...@@ -23,7 +23,6 @@ from .base_gate import BaseGate
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.nn.functional as F
class NaiveGate(BaseGate): class NaiveGate(BaseGate):
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
import math import math
import paddle import paddle
import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
from .naive_gate import NaiveGate from .naive_gate import NaiveGate
from ..utils import limit_by_capacity from ..utils import limit_by_capacity
......
...@@ -14,11 +14,8 @@ ...@@ -14,11 +14,8 @@
from paddle.fluid.clip import ClipGradBase, _squared_l2_norm from paddle.fluid.clip import ClipGradBase, _squared_l2_norm
from paddle.fluid.dygraph import base as imperative_base from paddle.fluid.dygraph import base as imperative_base
from paddle.fluid import core, layers, framework from paddle.fluid import core, layers
from paddle.distributed import collective from paddle.distributed import collective
import six
import warnings
import copy
class ClipGradForMOEByGlobalNorm(ClipGradBase): class ClipGradForMOEByGlobalNorm(ClipGradBase):
......
...@@ -19,22 +19,14 @@ ...@@ -19,22 +19,14 @@
# Copyright 2021, Jiaao He. All rights reserved. # Copyright 2021, Jiaao He. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License"). # Licensed under the Apache License, Version 2.0 (the "License").
import collections
import math
import numpy as np import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.nn.functional as F
from paddle.distributed.utils.moe_utils import global_scatter, global_gather from paddle.distributed.utils.moe_utils import global_scatter, global_gather
from paddle.distributed import alltoall, all_gather
from paddle.distributed.fleet.meta_parallel import get_rng_state_tracker
from paddle.distributed import fleet
from paddle.autograd import PyLayer from paddle.autograd import PyLayer
from .gate import NaiveGate, GShardGate, SwitchGate, BaseGate from .gate import NaiveGate, GShardGate, SwitchGate, BaseGate
from .utils import count_by_gate from .utils import count_by_gate
from paddle import fluid
from paddle.fluid.framework import in_dygraph_mode from paddle.fluid.framework import in_dygraph_mode
from paddle.incubate.distributed.fleet import recompute_hybrid from paddle.incubate.distributed.fleet import recompute_hybrid
......
...@@ -17,13 +17,10 @@ import paddle ...@@ -17,13 +17,10 @@ import paddle
# TODO: check the hooks of tensor # TODO: check the hooks of tensor
# TODO: check serializing named tensor # TODO: check serializing named tensor
# TODO: check influence on autograd # TODO: check influence on autograd
import os
import sys import sys
import warnings import warnings
import math
import copy import copy
import threading import threading
import multiprocessing
from multiprocessing.util import register_after_fork from multiprocessing.util import register_after_fork
from multiprocessing.reduction import ForkingPickler from multiprocessing.reduction import ForkingPickler
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode from paddle.fluid.framework import _non_static_mode
from paddle.tensor.linalg import matmul from paddle.tensor.linalg import matmul
from paddle import _C_ops, _legacy_C_ops from paddle import _legacy_C_ops
def fused_matmul_bias(x, def fused_matmul_bias(x,
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode, default_main_program from paddle.fluid.framework import _non_static_mode, default_main_program
from paddle.fluid.data_feeder import check_variable_and_dtype, check_dtype from paddle.fluid.data_feeder import check_variable_and_dtype, check_dtype
from paddle.fluid import core, dygraph_utils from paddle.fluid import core
from paddle import _C_ops, _legacy_C_ops from paddle import _legacy_C_ops
__all__ = [] __all__ = []
......
...@@ -11,10 +11,8 @@ ...@@ -11,10 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from paddle.nn import functional as F
from paddle.incubate.nn import functional as incubate_f from paddle.incubate.nn import functional as incubate_f
from paddle.nn import Layer from paddle.nn import Layer
from paddle.framework import ParamAttr
import paddle import paddle
from paddle.nn.layer.transformer import _convert_attention_mask, _convert_param_attr_to_list from paddle.nn.layer.transformer import _convert_attention_mask, _convert_param_attr_to_list
from paddle.nn.initializer import Constant from paddle.nn.initializer import Constant
......
...@@ -12,12 +12,10 @@ ...@@ -12,12 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode from paddle.fluid.framework import _non_static_mode
from paddle.fluid.data_feeder import check_variable_and_dtype from paddle.fluid.data_feeder import check_variable_and_dtype
from paddle.fluid import core from paddle import _legacy_C_ops
from paddle import _C_ops, _legacy_C_ops
def graph_khop_sampler(row, def graph_khop_sampler(row,
......
...@@ -12,12 +12,10 @@ ...@@ -12,12 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode from paddle.fluid.framework import _non_static_mode
from paddle.fluid.data_feeder import check_variable_and_dtype from paddle.fluid.data_feeder import check_variable_and_dtype
from paddle.fluid import core from paddle import _legacy_C_ops
from paddle import _C_ops, _legacy_C_ops
import paddle.utils.deprecated as deprecated import paddle.utils.deprecated as deprecated
......
...@@ -12,12 +12,10 @@ ...@@ -12,12 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode from paddle.fluid.framework import _non_static_mode
from paddle.fluid.data_feeder import check_variable_and_dtype from paddle.fluid.data_feeder import check_variable_and_dtype
from paddle.fluid import core from paddle import _legacy_C_ops
from paddle import _C_ops, _legacy_C_ops
import paddle.utils.deprecated as deprecated import paddle.utils.deprecated as deprecated
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
import numpy as np import numpy as np
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode, _in_legacy_dygraph, in_dygraph_mode from paddle.fluid.framework import _in_legacy_dygraph, in_dygraph_mode
from paddle.fluid.framework import Variable from paddle.fluid.framework import Variable
from paddle.fluid.data_feeder import check_variable_and_dtype, check_type, check_dtype, convert_dtype from paddle.fluid.data_feeder import check_variable_and_dtype, check_type, check_dtype, convert_dtype
from paddle.fluid.layers.tensor import cast from paddle.fluid.layers.tensor import cast
......
...@@ -12,28 +12,13 @@ ...@@ -12,28 +12,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import copy
import collections
import itertools
import six
import math
import sys
import warnings
from functools import partial, reduce
import numpy as np import numpy as np
import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle import framework
from paddle.device import get_device, get_cudnn_version
from paddle.nn import initializer as I from paddle.nn import initializer as I
from paddle.nn import Layer, LayerList from paddle.nn import Layer
from paddle.fluid.layers import utils from paddle.fluid.layers import utils
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.layers.utils import map_structure, flatten, pack_sequence_as
from paddle.fluid.data_feeder import convert_dtype
from paddle.fluid.param_attr import ParamAttr from paddle.fluid.param_attr import ParamAttr
from paddle import _C_ops, _legacy_C_ops
def resnet_unit(x, filter_x, scale_x, bias_x, mean_x, var_x, z, filter_z, def resnet_unit(x, filter_x, scale_x, bias_x, mean_x, var_x, z, filter_z,
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode from paddle.fluid.framework import _non_static_mode
from paddle.fluid import core from paddle import _legacy_C_ops
from paddle import _C_ops, _legacy_C_ops
def softmax_mask_fuse(x, mask, name=None): def softmax_mask_fuse(x, mask, name=None):
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.framework import _non_static_mode from paddle.fluid.framework import _non_static_mode
from paddle.fluid import core from paddle import _legacy_C_ops
from paddle import _C_ops, _legacy_C_ops
def softmax_mask_fuse_upper_triangle(x): def softmax_mask_fuse_upper_triangle(x):
......
...@@ -17,14 +17,11 @@ import paddle ...@@ -17,14 +17,11 @@ import paddle
from paddle.fluid import framework, core, layers, unique_name from paddle.fluid import framework, core, layers, unique_name
from paddle.fluid.framework import Variable from paddle.fluid.framework import Variable
from paddle.fluid.clip import ClipGradByGlobalNorm from paddle.fluid.clip import ClipGradByGlobalNorm
from paddle.fluid.initializer import Constant
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.optimizer import Optimizer from paddle.fluid.optimizer import Optimizer
from paddle.distributed.collective import new_group
from paddle.fluid.executor import global_scope from paddle.fluid.executor import global_scope
from paddle.fluid.framework import name_scope from paddle.fluid.framework import name_scope
from paddle.fluid import core, unique_name from paddle.fluid import core, unique_name
import numpy as np
def init_communicator(block, rank, ranks, ring_id): def init_communicator(block, rank, ranks, ring_id):
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
import paddle import paddle
from paddle.fluid.framework import Variable from paddle.fluid.framework import Variable
from paddle.fluid.data_feeder import check_type, check_dtype from paddle.fluid.data_feeder import check_type
def check_input_type(input, name, op_name): def check_input_type(input, name, op_name):
......
...@@ -13,11 +13,10 @@ ...@@ -13,11 +13,10 @@
# limitations under the License. # limitations under the License.
from paddle.optimizer import Optimizer from paddle.optimizer import Optimizer
from paddle.fluid import core, framework, layers, unique_name from paddle.fluid import framework, layers, unique_name
from paddle.fluid.framework import Program, Variable, name_scope, default_main_program, default_startup_program, device_guard from paddle.fluid.framework import Variable
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
import paddle import paddle
import numpy as np
from paddle.fluid.dygraph import base as imperative_base from paddle.fluid.dygraph import base as imperative_base
__all__ = [] __all__ = []
......
...@@ -13,11 +13,10 @@ ...@@ -13,11 +13,10 @@
# limitations under the License. # limitations under the License.
from paddle.optimizer import Optimizer from paddle.optimizer import Optimizer
from paddle.fluid import core, framework, layers from paddle.fluid import framework, layers
from paddle.fluid.framework import Program, Variable from paddle.fluid.framework import Program
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
import paddle import paddle
import numpy as np
from paddle.fluid.dygraph import base as imperative_base from paddle.fluid.dygraph import base as imperative_base
from paddle.fluid.wrapped_decorator import signature_safe_contextmanager from paddle.fluid.wrapped_decorator import signature_safe_contextmanager
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops, _legacy_C_ops
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import paddle
import paddle.fluid.ir as ir import paddle.fluid.ir as ir
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops
from paddle.fluid.framework import dygraph_only, core from paddle.fluid.framework import dygraph_only, core
from paddle import in_dynamic_mode from paddle import in_dynamic_mode
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
# limitations under the License. # limitations under the License.
import paddle import paddle
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops
from paddle.fluid.framework import core, dygraph_only from paddle.fluid.framework import core, dygraph_only
from paddle.fluid.framework import _current_expected_place, _get_paddle_place from paddle.fluid.framework import _current_expected_place, _get_paddle_place
from paddle.tensor import to_tensor, max from paddle.tensor import to_tensor, max
from paddle.fluid.data_feeder import check_variable_and_dtype, check_type, check_dtype, convert_dtype from paddle.fluid.data_feeder import convert_dtype
from paddle import in_dynamic_mode from paddle import in_dynamic_mode
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops
from paddle.fluid.framework import dygraph_only from paddle.fluid.framework import dygraph_only
__all__ = [] __all__ = []
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
__all__ = [] __all__ = []
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops
from paddle.fluid.framework import dygraph_only from paddle.fluid.framework import dygraph_only
from paddle import in_dynamic_mode from paddle import in_dynamic_mode
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
......
...@@ -14,10 +14,8 @@ ...@@ -14,10 +14,8 @@
__all__ = [] __all__ = []
from paddle import _C_ops, _legacy_C_ops, in_dynamic_mode from paddle import _C_ops, in_dynamic_mode
from paddle.fluid.layers.utils import convert_to_list from paddle.fluid.layers.utils import convert_to_list
from paddle.fluid.layers.nn import elementwise_add
from ...creation import sparse_coo_tensor
from ...binary import add from ...binary import add
from paddle.nn.functional.conv import _update_padding_nd from paddle.nn.functional.conv import _update_padding_nd
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
from paddle.fluid.layers import utils from paddle.fluid.layers import utils
from paddle import _C_ops, _legacy_C_ops, in_dynamic_mode from paddle import _C_ops, in_dynamic_mode
from paddle.nn.functional.pooling import _update_padding_nd from paddle.nn.functional.pooling import _update_padding_nd
__all__ = [] __all__ = []
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
__all__ = [] __all__ = []
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops
from paddle.fluid.framework import dygraph_only from paddle.fluid.framework import dygraph_only
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
import numpy as np import numpy as np
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops
from paddle.fluid.framework import dygraph_only, core, convert_np_dtype_to_dtype_ from paddle.fluid.framework import dygraph_only, core, convert_np_dtype_to_dtype_
__all__ = [] __all__ = []
......
...@@ -12,26 +12,14 @@ ...@@ -12,26 +12,14 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import copy
import collections
import itertools
import six
import math
import sys
import warnings
from functools import partial, reduce
import numpy as np import numpy as np
import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle import framework
from paddle.nn import initializer as I from paddle.nn import initializer as I
from paddle.nn import Layer, LayerList from paddle.nn import Layer
from paddle.fluid.layers import utils from paddle.fluid.layers import utils
from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.data_feeder import convert_dtype
from paddle.fluid.param_attr import ParamAttr from paddle.fluid.param_attr import ParamAttr
from paddle import _C_ops, _legacy_C_ops from paddle import _legacy_C_ops
__all__ = ['resnet_basic_block', 'ResNetBasicBlock'] __all__ = ['resnet_basic_block', 'ResNetBasicBlock']
......
...@@ -18,9 +18,9 @@ import numpy as np ...@@ -18,9 +18,9 @@ import numpy as np
from ..fluid.data_feeder import check_variable_and_dtype from ..fluid.data_feeder import check_variable_and_dtype
from ..fluid.layer_helper import LayerHelper from ..fluid.layer_helper import LayerHelper
from ..fluid.framework import core, _varbase_creator, _non_static_mode, _in_legacy_dygraph from ..fluid.framework import _non_static_mode, _varbase_creator
import paddle import paddle
from paddle import _C_ops, _legacy_C_ops from paddle import _legacy_C_ops
__all__ = [] __all__ = []
......
...@@ -22,8 +22,8 @@ import importlib ...@@ -22,8 +22,8 @@ import importlib
import json import json
import paddle import paddle
from paddle.fluid.core import (_Profiler, _ProfilerResult, ProfilerOptions, from paddle.fluid.core import (_Profiler, ProfilerOptions, TracerEventType,
TracerEventType, enable_memory_recorder, enable_memory_recorder,
enable_input_shape_recorder, enable_input_shape_recorder,
disable_memory_recorder, disable_memory_recorder,
disable_input_shape_recorder) disable_input_shape_recorder)
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import collections
def sum_ranges(ranges): def sum_ranges(ranges):
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import timeit import timeit
import logging
from collections import OrderedDict from collections import OrderedDict
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
import gzip import gzip
import tarfile import tarfile
import numpy as np import numpy as np
import six
from six.moves import cPickle as pickle
from paddle.io import Dataset from paddle.io import Dataset
import paddle.compat as cpt import paddle.compat as cpt
......
...@@ -15,11 +15,7 @@ ...@@ -15,11 +15,7 @@
import numpy as np import numpy as np
import zipfile import zipfile
import re import re
import random
import functools
import six
import paddle
from paddle.io import Dataset from paddle.io import Dataset
import paddle.compat as cpt import paddle.compat as cpt
from paddle.dataset.common import _check_exists_and_download from paddle.dataset.common import _check_exists_and_download
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import tarfile import tarfile
import numpy as np import numpy as np
import gzip
import six import six
from paddle.io import Dataset from paddle.io import Dataset
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
from ..nn import Layer from ..nn import Layer
from ..fluid.framework import core, _non_static_mode, in_dygraph_mode from ..fluid.framework import _non_static_mode, in_dygraph_mode
from ..fluid.layer_helper import LayerHelper from ..fluid.layer_helper import LayerHelper
from ..fluid.data_feeder import check_variable_and_dtype, check_type from ..fluid.data_feeder import check_variable_and_dtype, check_type
from paddle import _C_ops, _legacy_C_ops from paddle import _C_ops, _legacy_C_ops
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册