未验证 提交 ebc3f43d 编写于 作者: N Nyakku Shigure 提交者: GitHub

[CodeStyle][F401] remove unused import in unittests/test_[a-e] (#46691)

上级 c1efbdd4
...@@ -17,7 +17,7 @@ import numpy as np ...@@ -17,7 +17,7 @@ import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
class TestAccuracyOp(OpTest): class TestAccuracyOp(OpTest):
......
...@@ -21,7 +21,6 @@ import paddle.fluid.layers as layers ...@@ -21,7 +21,6 @@ import paddle.fluid.layers as layers
import paddle.fluid.core as core import paddle.fluid.core as core
import gradient_checker import gradient_checker
import paddle.nn.functional as F import paddle.nn.functional as F
from paddle.fluid.framework import _test_eager_guard
from decorator_helper import prog_scope from decorator_helper import prog_scope
......
...@@ -17,13 +17,12 @@ import unittest ...@@ -17,13 +17,12 @@ import unittest
import numpy as np import numpy as np
from scipy.special import expit, erf from scipy.special import expit, erf
from op_test import OpTest, convert_float_to_uint16, skip_check_grad_ci from op_test import OpTest, convert_float_to_uint16
import paddle import paddle
import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
paddle.enable_static() paddle.enable_static()
......
...@@ -14,10 +14,8 @@ ...@@ -14,10 +14,8 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator from paddle.fluid.op import Operator
from op_test import OpTest
import paddle import paddle
......
...@@ -13,12 +13,7 @@ ...@@ -13,12 +13,7 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np
import paddle import paddle
import paddle.fluid.core as core
from paddle.fluid.op import Operator
from op_test import OpTest
import math
class TestAdagradOpV2(unittest.TestCase): class TestAdagradOpV2(unittest.TestCase):
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -15,10 +15,8 @@ ...@@ -15,10 +15,8 @@
import numpy as np import numpy as np
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -17,7 +17,6 @@ import unittest ...@@ -17,7 +17,6 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -16,10 +16,8 @@ import unittest ...@@ -16,10 +16,8 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
def adaptive_start_index(index, input_size, output_size): def adaptive_start_index(index, input_size, output_size):
......
...@@ -14,9 +14,8 @@ ...@@ -14,9 +14,8 @@
import numpy as np import numpy as np
import unittest import unittest
from op_test import OpTest, check_out_dtype from op_test import check_out_dtype
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard
import paddle import paddle
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -16,10 +16,9 @@ import unittest ...@@ -16,10 +16,9 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest, check_out_dtype from op_test import check_out_dtype
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -16,10 +16,9 @@ import unittest ...@@ -16,10 +16,9 @@ import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest, check_out_dtype from op_test import check_out_dtype
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import math import math
import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -18,7 +18,6 @@ Unit testing for affine_channel_op ...@@ -18,7 +18,6 @@ Unit testing for affine_channel_op
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -14,10 +14,9 @@ ...@@ -14,10 +14,9 @@
import paddle import paddle
import numpy as np import numpy as np
from paddle import fluid, nn from paddle import fluid
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest import unittest
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np
import paddle import paddle
from test_collective_base import TestDistBase from test_collective_base import TestDistBase
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest, skip_check_grad_ci from op_test import OpTest
import paddle.fluid as fluid
import paddle.fluid.contrib.mixed_precision.amp_nn as amp_nn import paddle.fluid.contrib.mixed_precision.amp_nn as amp_nn
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math
from op_test import OpTest from op_test import OpTest
......
...@@ -17,7 +17,6 @@ import unittest ...@@ -17,7 +17,6 @@ import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from test_attribute_var import UnittestBase from test_attribute_var import UnittestBase
......
...@@ -15,12 +15,10 @@ ...@@ -15,12 +15,10 @@
import unittest import unittest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import numpy as np import numpy as np
import six import six
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import ParamAttr
from paddle.fluid.framework import Program, grad_var_name from paddle.fluid.framework import Program, grad_var_name
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
from paddle.fluid.backward import append_backward from paddle.fluid.backward import append_backward
......
...@@ -21,7 +21,7 @@ import paddle.fluid.layers as layers ...@@ -21,7 +21,7 @@ import paddle.fluid.layers as layers
from paddle.fluid.executor import Executor from paddle.fluid.executor import Executor
from paddle.fluid.backward import append_backward from paddle.fluid.backward import append_backward
from paddle.fluid.framework import default_main_program from paddle.fluid.framework import default_main_program
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
import numpy as np import numpy as np
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import unittest import unittest
......
...@@ -17,9 +17,8 @@ import numpy as np ...@@ -17,9 +17,8 @@ import numpy as np
import unittest import unittest
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid.backward import append_backward from paddle.fluid.backward import append_backward
import paddle.fluid.framework as framework import paddle.fluid.framework as framework
import gradient_checker import gradient_checker
......
...@@ -17,10 +17,6 @@ import numpy as np ...@@ -17,10 +17,6 @@ import numpy as np
import unittest import unittest
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
from paddle.fluid.backward import append_backward
from paddle.distributed.models.moe import utils from paddle.distributed.models.moe import utils
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -17,11 +17,7 @@ import unittest ...@@ -17,11 +17,7 @@ import unittest
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.nn as nn
import paddle.nn.functional as F
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard
paddle.enable_static() paddle.enable_static()
np.random.seed(0) np.random.seed(0)
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import unittest.mock import unittest.mock
from io import StringIO
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
...@@ -23,14 +22,9 @@ import paddle.nn.functional as F ...@@ -23,14 +22,9 @@ import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
import paddle.tensor as tensor import paddle.tensor as tensor
from paddle.fluid import layers from paddle.fluid import layers
from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.utils import append_distributed_attr_suffix
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed.auto_parallel.dist_context import set_default_distributed_context
paddle.enable_static() paddle.enable_static()
_global_parallel_strategy = None _global_parallel_strategy = None
......
...@@ -13,25 +13,18 @@ ...@@ -13,25 +13,18 @@
# limitations under the License. # limitations under the License.
import collections import collections
import math
import unittest import unittest
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.tensor as tensor import paddle.tensor as tensor
import paddle.utils as utils import paddle.utils as utils
from paddle.fluid import layers from paddle.fluid import layers
from paddle.fluid.framework import _non_static_mode
from paddle.nn.layer.transformer import _convert_param_attr_to_list from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.distributed.fleet import fleet
import paddle.static as static import paddle.static as static
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
paddle.enable_static() paddle.enable_static()
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import copy
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.static as static import paddle.static as static
...@@ -29,7 +28,6 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer ...@@ -29,7 +28,6 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.cost_model import estimate_cost from paddle.distributed.auto_parallel.cost_model import estimate_cost
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
paddle.enable_static() paddle.enable_static()
_global_parallel_strategy = "dp_mp_pp" _global_parallel_strategy = "dp_mp_pp"
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
...@@ -16,7 +16,6 @@ import copy ...@@ -16,7 +16,6 @@ import copy
import unittest import unittest
import paddle import paddle
from paddle.fluid import core
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed import fleet from paddle.distributed import fleet
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import os
import json
from paddle.distributed.auto_parallel.graph import Node
from paddle.distributed.auto_parallel.graph import Edge
from paddle.distributed.auto_parallel.graph import Graph from paddle.distributed.auto_parallel.graph import Graph
......
...@@ -16,22 +16,17 @@ import tempfile ...@@ -16,22 +16,17 @@ import tempfile
import unittest import unittest
import os import os
import json import json
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.fluid as fluid import paddle.fluid as fluid
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.tensor as tensor
import paddle.utils as utils import paddle.utils as utils
import paddle.static as static import paddle.static as static
from paddle.fluid import core from paddle.fluid import core
from paddle.fluid import layers from paddle.fluid import layers
from paddle.fluid.framework import _non_static_mode from paddle.fluid.initializer import NumpyArrayInitializer
from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.distributed import fleet from paddle.distributed import fleet
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
...@@ -40,15 +35,7 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer ...@@ -40,15 +35,7 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.process_group import get_all_process_groups
from paddle.distributed.auto_parallel.process_group import new_process_group
from paddle.distributed.auto_parallel.cluster import Cluster from paddle.distributed.auto_parallel.cluster import Cluster
from paddle.distributed.auto_parallel.cluster import DeviceType
from paddle.distributed.auto_parallel.cluster import LinkType
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.mapper import build_process_graph
from paddle.distributed.auto_parallel.mapper import build_cluster_graph
from paddle.distributed.auto_parallel.mapper import mapping from paddle.distributed.auto_parallel.mapper import mapping
from paddle.distributed.auto_parallel.mapper import get_dtype_bytes from paddle.distributed.auto_parallel.mapper import get_dtype_bytes
from paddle.distributed.auto_parallel.mapper import get_comm_volume from paddle.distributed.auto_parallel.mapper import get_comm_volume
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import unittest.mock import unittest.mock
from io import StringIO
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
...@@ -24,12 +22,8 @@ import paddle.nn.functional as F ...@@ -24,12 +22,8 @@ import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
import paddle.tensor as tensor import paddle.tensor as tensor
from paddle.fluid import layers from paddle.fluid import layers
from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.utils import append_distributed_attr_suffix
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed import fleet from paddle.distributed import fleet
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
......
...@@ -13,26 +13,18 @@ ...@@ -13,26 +13,18 @@
# limitations under the License. # limitations under the License.
import collections import collections
import math
import unittest import unittest
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.tensor as tensor import paddle.tensor as tensor
import paddle.utils as utils import paddle.utils as utils
from paddle.fluid import layers from paddle.fluid import layers
from paddle.fluid.framework import _non_static_mode
from paddle.nn.layer.transformer import _convert_param_attr_to_list from paddle.nn.layer.transformer import _convert_param_attr_to_list
from paddle.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.distributed import fleet
import paddle.static as static import paddle.static as static
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed.auto_parallel.utils import check_distributed_attr_for_program
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.utils import _get_comm_group from paddle.distributed.auto_parallel.utils import _get_comm_group
......
...@@ -27,7 +27,6 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer ...@@ -27,7 +27,6 @@ from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.process_group import _g_process_group_map, ProcessGroup from paddle.distributed.auto_parallel.process_group import _g_process_group_map, ProcessGroup
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
paddle.enable_static() paddle.enable_static()
_global_parallel_strategy = None _global_parallel_strategy = None
......
...@@ -26,7 +26,6 @@ from paddle.distributed import fleet ...@@ -26,7 +26,6 @@ from paddle.distributed import fleet
from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.cost import CostEstimator from paddle.distributed.auto_parallel.cost import CostEstimator
from paddle.distributed.auto_parallel.cluster import Cluster from paddle.distributed.auto_parallel.cluster import Cluster
......
...@@ -26,7 +26,6 @@ from paddle.distributed import fleet ...@@ -26,7 +26,6 @@ from paddle.distributed import fleet
from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.partitioner import Partitioner from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
from paddle.distributed.auto_parallel.cost import CostEstimator from paddle.distributed.auto_parallel.cost import CostEstimator
from paddle.distributed.auto_parallel.cluster import Cluster from paddle.distributed.auto_parallel.cluster import Cluster
......
...@@ -26,9 +26,6 @@ import paddle.utils as utils ...@@ -26,9 +26,6 @@ import paddle.utils as utils
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.dist_context import get_default_distributed_context from paddle.distributed.auto_parallel.dist_context import get_default_distributed_context
from paddle.distributed import fleet from paddle.distributed import fleet
from paddle.distributed.auto_parallel.partitioner import Partitioner
from paddle.distributed.auto_parallel.reshard import Resharder
from paddle.distributed.auto_parallel.process_group import new_process_group
paddle.enable_static() paddle.enable_static()
_global_parallel_strategy = None _global_parallel_strategy = None
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +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 os
import copy
import json
import unittest import unittest
import paddle import paddle
...@@ -22,13 +19,9 @@ import paddle.nn as nn ...@@ -22,13 +19,9 @@ import paddle.nn as nn
import paddle.static as static import paddle.static as static
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
from paddle.distributed import fleet
from paddle.distributed.fleet import auto from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.cluster import Cluster from paddle.distributed.auto_parallel.planner import PlanSpace
from paddle.distributed.auto_parallel.utils import SerialProgramInfo
from paddle.distributed.auto_parallel.planner import PlanSpace, PlanFilter
from paddle.distributed.auto_parallel.dist_context import DistributedContext from paddle.distributed.auto_parallel.dist_context import DistributedContext
from paddle.distributed.auto_parallel.utils import get_all_distributed_main_program
from paddle.distributed.auto_parallel.dist_attribute import TensorDistributedAttribute from paddle.distributed.auto_parallel.dist_attribute import TensorDistributedAttribute
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute
from paddle.distributed.auto_parallel.utils import update_op_dims_mapping_by_default_dist_impl from paddle.distributed.auto_parallel.utils import update_op_dims_mapping_by_default_dist_impl
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +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 unittest import unittest
import copy
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
...@@ -23,11 +20,8 @@ import paddle.nn.functional as F ...@@ -23,11 +20,8 @@ import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import layers from paddle.fluid import layers
from paddle.distributed.auto_parallel.operators.common import DistributedOperatorImplContainer
from paddle.distributed.auto_parallel.operators.common import DistributedOperatorImpl
from paddle.distributed.auto_parallel.operators.common import get_distributed_operator_impl_container from paddle.distributed.auto_parallel.operators.common import get_distributed_operator_impl_container
from paddle.distributed.auto_parallel.dist_context import DistributedContext, DistributedOperatorContext from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute, TensorDistributedAttribute
from paddle.distributed.auto_parallel.dist_op import DistributedOperator from paddle.distributed.auto_parallel.dist_op import DistributedOperator
paddle.enable_static() paddle.enable_static()
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +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 unittest import unittest
import copy
import numpy as np
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
...@@ -23,11 +20,8 @@ import paddle.nn.functional as F ...@@ -23,11 +20,8 @@ import paddle.nn.functional as F
import paddle.utils as utils import paddle.utils as utils
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import layers from paddle.fluid import layers
from paddle.distributed.auto_parallel.operators.common import DistributedOperatorImplContainer
from paddle.distributed.auto_parallel.operators.common import DistributedOperatorImpl
from paddle.distributed.auto_parallel.operators.common import get_distributed_operator_impl_container from paddle.distributed.auto_parallel.operators.common import get_distributed_operator_impl_container
from paddle.distributed.auto_parallel.dist_context import DistributedContext, DistributedOperatorContext from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute, TensorDistributedAttribute
from paddle.distributed.auto_parallel.dist_op import DistributedOperator from paddle.distributed.auto_parallel.dist_op import DistributedOperator
paddle.enable_static() paddle.enable_static()
......
...@@ -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.
from decorator_helper import prog_scope
import unittest import unittest
import paddle.fluid as fluid import paddle.fluid as fluid
import numpy as np import numpy as np
......
...@@ -13,15 +13,10 @@ ...@@ -13,15 +13,10 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers import paddle.fluid.layers as layers
import paddle.fluid.core as core
from paddle.fluid.contrib.layers import basic_gru, basic_lstm from paddle.fluid.contrib.layers import basic_gru, basic_lstm
from paddle.fluid.executor import Executor
from paddle.fluid import framework
from test_imperative_base import new_program_scope from test_imperative_base import new_program_scope
import numpy as np
class TestBasicGRUApiName(unittest.TestCase): class TestBasicGRUApiName(unittest.TestCase):
......
...@@ -14,11 +14,8 @@ ...@@ -14,11 +14,8 @@
import unittest import unittest
import numpy as np import numpy as np
import random
from op_test import OpTest from op_test import OpTest
import paddle.fluid as fluid from op_test import OpTest
from paddle.fluid import Program, program_guard
from op_test import OpTest, skip_check_grad_ci
import paddle.fluid.core as core import paddle.fluid.core as core
......
...@@ -12,14 +12,11 @@ ...@@ -12,14 +12,11 @@
# 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 os
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest, _set_use_system_allocator from paddle.fluid.framework import _test_eager_guard
from paddle.fluid.framework import grad_var_name, _test_eager_guard
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
import paddle import paddle
......
...@@ -15,10 +15,8 @@ ...@@ -15,10 +15,8 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid
from paddle.io import BatchSampler, Dataset, Sampler, SequenceSampler, \ from paddle.io import BatchSampler, Dataset, Sampler, SequenceSampler, \
RandomSampler, WeightedRandomSampler RandomSampler, WeightedRandomSampler
from paddle.io import DistributedBatchSampler
IMAGE_SIZE = 32 IMAGE_SIZE = 32
......
...@@ -16,7 +16,6 @@ import paddle ...@@ -16,7 +16,6 @@ import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import numpy as np import numpy as np
import unittest import unittest
from op_test import OpTest
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
......
...@@ -12,8 +12,7 @@ ...@@ -12,8 +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.
import logging from paddle.fluid.op import Operator
from paddle.fluid.op import Operator, DynamicRecurrentOp
import paddle.fluid.core as core import paddle.fluid.core as core
import unittest import unittest
import numpy as np import numpy as np
......
...@@ -16,7 +16,6 @@ import unittest ...@@ -16,7 +16,6 @@ import unittest
import paddle import paddle
from op_test import OpTest from op_test import OpTest
import numpy as np import numpy as np
import os
def output_hist(out): def output_hist(out):
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest, _in_eager_without_dygraph_check from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle import paddle
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -18,8 +18,6 @@ import tempfile ...@@ -18,8 +18,6 @@ import tempfile
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
from op_test import OpTest from op_test import OpTest
import paddle.inference as paddle_infer import paddle.inference as paddle_infer
from paddle.fluid.framework import in_dygraph_mode from paddle.fluid.framework import in_dygraph_mode
......
...@@ -17,8 +17,6 @@ import numpy as np ...@@ -17,8 +17,6 @@ import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.tensor as tensor
from paddle.fluid import Program, program_guard
class TestBmmOp(OpTest): class TestBmmOp(OpTest):
......
...@@ -14,10 +14,7 @@ ...@@ -14,10 +14,7 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math
from op_test import OpTest from op_test import OpTest
import copy
def box_clip(input_box, im_info, output_box): def box_clip(input_box, im_info, output_box):
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import sys
import math
from op_test import OpTest from op_test import OpTest
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.layers as layers
import numpy as np
import os
import shutil
import paddle.fluid.core as core import paddle.fluid.core as core
import unittest import unittest
from paddle.fluid.layers.nn import _pull_box_sparse from paddle.fluid.layers.nn import _pull_box_sparse
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np
import paddle import paddle
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
from test_collective_base import TestDistBase
import random import random
......
...@@ -14,9 +14,8 @@ ...@@ -14,9 +14,8 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
import paddle import paddle
paddle.enable_static() paddle.enable_static()
......
...@@ -12,14 +12,10 @@ ...@@ -12,14 +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.
from re import X
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
np.random.seed(10) np.random.seed(10)
......
...@@ -14,12 +14,10 @@ ...@@ -14,12 +14,10 @@
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.framework import Parameter
import numpy as np import numpy as np
from simple_nets import simple_fc_net from simple_nets import simple_fc_net
import random import random
import unittest import unittest
import os
batch_size = 32 batch_size = 32
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import paddle import paddle
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -13,11 +13,6 @@ ...@@ -13,11 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import numpy as np
from op_test import OpTest
import paddle
import paddle.fluid as fluid
from paddle.framework import core
from paddle.fluid.tests.unittests.c_embedding_op_base import TestCEmbeddingCPU, TestCEmbeddingOpBase, TestCEmbeddingOpFP32 from paddle.fluid.tests.unittests.c_embedding_op_base import TestCEmbeddingCPU, TestCEmbeddingOpBase, TestCEmbeddingOpFP32
TestCEmbeddingCPU() TestCEmbeddingCPU()
......
...@@ -18,7 +18,7 @@ import numpy as np ...@@ -18,7 +18,7 @@ import numpy as np
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard from paddle.fluid import Program, program_guard
from op_test import OpTest, convert_uint16_to_float, convert_float_to_uint16 from op_test import OpTest, convert_uint16_to_float, convert_float_to_uint16
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
import gradient_checker import gradient_checker
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -13,15 +13,9 @@ ...@@ -13,15 +13,9 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle.fluid as fluid
import paddle.fluid.incubate.fleet.base.role_maker as role_maker
from paddle.fluid.incubate.fleet.collective import CollectiveOptimizer, fleet
from paddle.fluid.incubate.checkpoint.auto_checkpoint import ExeTrainStatus
from paddle.fluid.incubate.checkpoint.checkpoint_saver import CheckpointSaver from paddle.fluid.incubate.checkpoint.checkpoint_saver import CheckpointSaver
import os
import sys
from paddle.distributed.fleet.utils.fs import LocalFS, HDFSClient from paddle.distributed.fleet.utils.fs import HDFSClient
from paddle.fluid.incubate.checkpoint.checkpoint_saver import CheckpointSaver from paddle.fluid.incubate.checkpoint.checkpoint_saver import CheckpointSaver
......
...@@ -128,10 +128,8 @@ class TestCholeskySingularAPI(unittest.TestCase): ...@@ -128,10 +128,8 @@ class TestCholeskySingularAPI(unittest.TestCase):
fetch_list=[result]) fetch_list=[result])
except RuntimeError as ex: except RuntimeError as ex:
print("The mat is singular") print("The mat is singular")
pass
except ValueError as ex: except ValueError as ex:
print("The mat is singular") print("The mat is singular")
pass
def test_static(self): def test_static(self):
for place in self.places: for place in self.places:
...@@ -148,10 +146,8 @@ class TestCholeskySingularAPI(unittest.TestCase): ...@@ -148,10 +146,8 @@ class TestCholeskySingularAPI(unittest.TestCase):
result = paddle.cholesky(input) result = paddle.cholesky(input)
except RuntimeError as ex: except RuntimeError as ex:
print("The mat is singular") print("The mat is singular")
pass
except ValueError as ex: except ValueError as ex:
print("The mat is singular") print("The mat is singular")
pass
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import numpy as np import numpy as np
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from paddle import fluid from paddle import fluid
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import math
import random
import paddle import paddle
import paddle.fluid.core as core import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import math
import sys
from op_test import OpTest from op_test import OpTest
......
...@@ -14,19 +14,14 @@ ...@@ -14,19 +14,14 @@
import numpy as np import numpy as np
import unittest import unittest
import time
import argparse
import os import os
import sys import sys
import subprocess import subprocess
import traceback
import functools
import pickle import pickle
import tempfile import tempfile
from contextlib import closing from contextlib import closing
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.unique_name as nameGen
from paddle.fluid import core from paddle.fluid import core
...@@ -157,7 +152,6 @@ def runtime_main(test_class, col_type): ...@@ -157,7 +152,6 @@ def runtime_main(test_class, col_type):
model.run_trainer(args) model.run_trainer(args)
import paddle.compat as cpt
import socket import socket
from contextlib import closing from contextlib import closing
......
...@@ -15,12 +15,9 @@ ...@@ -15,12 +15,9 @@
import numpy as np import numpy as np
import unittest import unittest
import time import time
import argparse
import os import os
import sys import sys
import subprocess import subprocess
import traceback
import functools
import pickle import pickle
import tempfile import tempfile
from contextlib import closing from contextlib import closing
...@@ -130,7 +127,6 @@ def runtime_main(test_class, col_type, sub_type): ...@@ -130,7 +127,6 @@ def runtime_main(test_class, col_type, sub_type):
model.run_trainer(args) model.run_trainer(args)
import paddle.compat as cpt
import socket import socket
from contextlib import closing from contextlib import closing
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
import os import os
import unittest import unittest
import time import time
import threading
import numpy
import paddle import paddle
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
import os import os
import sys import sys
import time import time
import threading
import subprocess import subprocess
import unittest import unittest
import numpy import numpy
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
import os import os
import unittest import unittest
import time import time
import threading
import numpy
import tempfile import tempfile
import paddle import paddle
......
...@@ -17,7 +17,6 @@ import unittest ...@@ -17,7 +17,6 @@ import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
def create_test_not_equal_class(op_type, typename, callback): def create_test_not_equal_class(op_type, typename, callback):
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
# limitations under the License. # limitations under the License.
import unittest import unittest
import paddle
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
......
...@@ -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 fluid, tensor from paddle import fluid
import paddle import paddle
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import numpy as np import numpy as np
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle
from numpy.random import random as rand from numpy.random import random as rand
from paddle import tensor from paddle import tensor
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -16,7 +16,7 @@ import unittest ...@@ -16,7 +16,7 @@ import unittest
import numpy as np import numpy as np
from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16 from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard, core from paddle.fluid import Program, core, program_guard
from paddle.fluid.framework import _test_eager_guard from paddle.fluid.framework import _test_eager_guard
import paddle import paddle
import gradient_checker import gradient_checker
......
...@@ -15,12 +15,10 @@ ...@@ -15,12 +15,10 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid.core as core
import sys import sys
sys.path.append("..") sys.path.append("..")
from op_test import OpTest from op_test import OpTest
from paddle.fluid import Program, program_guard
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import paddle.static as static import paddle.static as static
from numpy.random import random as rand from numpy.random import random as rand
......
...@@ -17,7 +17,6 @@ import paddle ...@@ -17,7 +17,6 @@ import paddle
from paddle import fluid, nn from paddle import fluid, nn
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest import unittest
......
...@@ -17,7 +17,6 @@ import paddle ...@@ -17,7 +17,6 @@ import paddle
from paddle import fluid, nn from paddle import fluid, nn
import paddle.fluid.dygraph as dg import paddle.fluid.dygraph as dg
import paddle.nn.functional as F import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest import unittest
......
...@@ -20,8 +20,6 @@ import paddle ...@@ -20,8 +20,6 @@ import paddle
paddle.enable_static() paddle.enable_static()
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest
from paddle.fluid import Program, program_guard
class TestConv2DAPI(unittest.TestCase): class TestConv2DAPI(unittest.TestCase):
......
...@@ -19,9 +19,6 @@ import paddle ...@@ -19,9 +19,6 @@ import paddle
paddle.enable_static() paddle.enable_static()
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest
from paddle.fluid import Program, program_guard
from test_conv2d_op import TestConv2DOp, TestConv2DOp_v2, create_test_padding_SAME_class, create_test_padding_VALID_class, create_test_channel_last_class, create_test_cudnn_padding_SAME_class, create_test_cudnn_channel_last_class from test_conv2d_op import TestConv2DOp, TestConv2DOp_v2, create_test_padding_SAME_class, create_test_padding_VALID_class, create_test_channel_last_class, create_test_cudnn_padding_SAME_class, create_test_cudnn_channel_last_class
#----------------TestDepthwiseConv ----- #----------------TestDepthwiseConv -----
......
...@@ -18,9 +18,6 @@ import numpy as np ...@@ -18,9 +18,6 @@ import numpy as np
import paddle import paddle
paddle.enable_static() paddle.enable_static()
import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest
from test_conv2d_transpose_op import TestConv2DTransposeOp from test_conv2d_transpose_op import TestConv2DTransposeOp
......
...@@ -19,7 +19,6 @@ import paddle ...@@ -19,7 +19,6 @@ import paddle
paddle.enable_static() paddle.enable_static()
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest from op_test import OpTest
......
...@@ -17,7 +17,6 @@ import numpy as np ...@@ -17,7 +17,6 @@ import numpy as np
import paddle.fluid.core as core import paddle.fluid.core as core
import paddle.fluid as fluid import paddle.fluid as fluid
from op_test import OpTest
from test_conv3d_transpose_op import TestConv3DTransposeOp from test_conv3d_transpose_op import TestConv3DTransposeOp
......
...@@ -15,10 +15,7 @@ ...@@ -15,10 +15,7 @@
import paddle.fluid as fluid import paddle.fluid as fluid
import unittest import unittest
import numpy as np import numpy as np
import six
import paddle import paddle
import warnings
import sys
np_minor_version = int((np.__version__).split('.')[1]) np_minor_version = int((np.__version__).split('.')[1])
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
from op_test import OpTest
import paddle import paddle
import paddle.nn as nn import paddle.nn as nn
import paddle.nn.functional as F import paddle.nn.functional as F
......
...@@ -15,9 +15,7 @@ ...@@ -15,9 +15,7 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
np.random.seed(10) np.random.seed(10)
......
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
import paddle.fluid as fluid import paddle.fluid as fluid
import unittest import unittest
import numpy as np import numpy as np
import six
import paddle import paddle
from paddle.fluid.framework import _test_eager_guard, in_dygraph_mode from paddle.fluid.framework import _test_eager_guard
def numpy_cov(np_arr, rowvar=True, ddof=1, fweights=None, aweights=None): def numpy_cov(np_arr, rowvar=True, ddof=1, fweights=None, aweights=None):
......
...@@ -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 os, shutil
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -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 os, shutil
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid import Program, program_guard from paddle.fluid import Program, program_guard
from paddle.fluid import ParamAttr, initializer
import paddle import paddle
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import unittest import unittest
import numpy as np import numpy as np
import paddle.fluid.core as core
from op_test import OpTest from op_test import OpTest
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册