未验证 提交 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
from op_test import OpTest
import paddle
import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
from paddle.fluid import Program, program_guard
class TestAccuracyOp(OpTest):
......
......@@ -21,7 +21,6 @@ import paddle.fluid.layers as layers
import paddle.fluid.core as core
import gradient_checker
import paddle.nn.functional as F
from paddle.fluid.framework import _test_eager_guard
from decorator_helper import prog_scope
......
......@@ -17,13 +17,12 @@ import unittest
import numpy as np
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.nn as nn
import paddle.nn.functional as F
import paddle.fluid as fluid
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
paddle.enable_static()
......
......@@ -14,10 +14,8 @@
import unittest
import numpy as np
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid.op import Operator
from op_test import OpTest
import paddle
......
......@@ -13,12 +13,7 @@
# limitations under the License.
import unittest
import numpy as np
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):
......
......@@ -14,7 +14,6 @@
import unittest
import numpy as np
from op_test import OpTest
import paddle
import paddle.fluid as fluid
from paddle.fluid.framework import _test_eager_guard
......
......@@ -15,10 +15,8 @@
import numpy as np
import unittest
import numpy as np
from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
import paddle
import paddle.nn.functional as F
import paddle.fluid as fluid
......
......@@ -17,7 +17,6 @@ import unittest
import numpy as np
import paddle.fluid.core as core
from op_test import OpTest
import paddle
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
......
......@@ -16,10 +16,8 @@ import unittest
import numpy as np
import paddle.fluid.core as core
from op_test import OpTest
import paddle
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
def adaptive_start_index(index, input_size, output_size):
......
......@@ -14,9 +14,8 @@
import numpy as np
import unittest
from op_test import OpTest, check_out_dtype
from op_test import check_out_dtype
import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard
import paddle
import paddle.nn.functional as F
import paddle.fluid as fluid
......
......@@ -16,10 +16,9 @@ import unittest
import numpy as np
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.fluid as fluid
from paddle.fluid import Program, program_guard
import paddle.nn.functional as F
......
......@@ -16,10 +16,9 @@ import unittest
import numpy as np
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.fluid as fluid
from paddle.fluid import Program, program_guard
import paddle.nn.functional as F
......
......@@ -14,7 +14,6 @@
import unittest
import numpy as np
import math
import paddle.fluid.core as core
from op_test import OpTest
import paddle.fluid as fluid
import paddle
......
......@@ -15,7 +15,6 @@
import unittest
import numpy as np
import paddle
import paddle.fluid.core as core
from op_test import OpTest
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
......
......@@ -18,7 +18,6 @@ Unit testing for affine_channel_op
import unittest
import numpy as np
from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid
......
......@@ -14,10 +14,9 @@
import paddle
import numpy as np
from paddle import fluid, nn
from paddle import fluid
import paddle.fluid.dygraph as dg
import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import unittest
import numpy as np
import paddle
from test_collective_base import TestDistBase
......
......@@ -14,8 +14,7 @@
import unittest
import numpy as np
from op_test import OpTest, skip_check_grad_ci
import paddle.fluid as fluid
from op_test import OpTest
import paddle.fluid.contrib.mixed_precision.amp_nn as amp_nn
......
......@@ -14,8 +14,6 @@
import unittest
import numpy as np
import sys
import math
from op_test import OpTest
......
......@@ -17,7 +17,6 @@ import unittest
import numpy as np
from op_test import OpTest
import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
from test_attribute_var import UnittestBase
......
......@@ -15,12 +15,10 @@
import unittest
import paddle
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import numpy as np
import six
import paddle.fluid.core as core
from paddle.fluid import ParamAttr
from paddle.fluid.framework import Program, grad_var_name
from paddle.fluid.executor import Executor
from paddle.fluid.backward import append_backward
......
......@@ -21,7 +21,7 @@ import paddle.fluid.layers as layers
from paddle.fluid.executor import Executor
from paddle.fluid.backward import append_backward
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
......
......@@ -14,7 +14,6 @@
import paddle
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import unittest
......
......@@ -17,9 +17,8 @@ import numpy as np
import unittest
import paddle
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 import Program, program_guard
from paddle.fluid.backward import append_backward
import paddle.fluid.framework as framework
import gradient_checker
......
......@@ -17,10 +17,6 @@ import numpy as np
import unittest
import paddle
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.fluid.framework import _test_eager_guard
......
......@@ -17,11 +17,7 @@ import unittest
from op_test import OpTest
import paddle
import paddle.nn as nn
import paddle.nn.functional as F
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid import compiler, Program, program_guard
paddle.enable_static()
np.random.seed(0)
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
......@@ -14,7 +14,6 @@
import unittest
import unittest.mock
from io import StringIO
import paddle
import paddle.nn as nn
......@@ -23,14 +22,9 @@ import paddle.nn.functional as F
import paddle.utils as utils
import paddle.tensor as tensor
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.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 set_default_distributed_context
paddle.enable_static()
_global_parallel_strategy = None
......
......@@ -13,25 +13,18 @@
# limitations under the License.
import collections
import math
import unittest
import numpy as np
import paddle
import paddle.nn as nn
import paddle.nn.functional as F
import paddle.tensor as tensor
import paddle.utils as utils
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.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.distributed.fleet import fleet
import paddle.static as static
from paddle.distributed.fleet import auto
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
paddle.enable_static()
......
......@@ -14,7 +14,6 @@
import unittest
import copy
import paddle
import paddle.nn as nn
import paddle.static as static
......@@ -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.cost_model import estimate_cost
import paddle.fluid.core as core
from paddle.distributed.auto_parallel.utils import print_program_with_dist_attr
paddle.enable_static()
_global_parallel_strategy = "dp_mp_pp"
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
......@@ -16,7 +16,6 @@ import copy
import unittest
import paddle
from paddle.fluid import core
from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.completion import Completer
from paddle.distributed import fleet
......
......@@ -13,10 +13,6 @@
# limitations under the License.
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
......
......@@ -16,22 +16,17 @@ import tempfile
import unittest
import os
import json
import collections
import math
import numpy as np
import paddle
import paddle.nn as nn
import paddle.fluid as fluid
import paddle.nn.functional as F
import paddle.tensor as tensor
import paddle.utils as utils
import paddle.static as static
from paddle.fluid import core
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.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.fluid.initializer import NumpyArrayInitializer
from paddle.distributed import fleet
from paddle.distributed.fleet import auto
......@@ -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.partitioner import Partitioner
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 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 get_dtype_bytes
from paddle.distributed.auto_parallel.mapper import get_comm_volume
......
......@@ -14,8 +14,6 @@
import unittest
import unittest.mock
from io import StringIO
import numpy as np
import paddle
import paddle.nn as nn
......@@ -24,12 +22,8 @@ import paddle.nn.functional as F
import paddle.utils as utils
import paddle.tensor as tensor
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.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 import fleet
from paddle.distributed.auto_parallel.partitioner import Partitioner
......
......@@ -13,26 +13,18 @@
# limitations under the License.
import collections
import math
import unittest
import numpy as np
import paddle
import paddle.nn as nn
import paddle.nn.functional as F
import paddle.tensor as tensor
import paddle.utils as utils
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.fluid.initializer import Normal, Constant, NumpyArrayInitializer
from paddle.distributed import fleet
import paddle.static as static
from paddle.distributed.fleet import auto
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.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.utils import _get_comm_group
......
......@@ -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.reshard import Resharder
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()
_global_parallel_strategy = None
......
......@@ -26,7 +26,6 @@ from paddle.distributed import fleet
from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.partitioner import Partitioner
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.cluster import Cluster
......
......@@ -26,7 +26,6 @@ from paddle.distributed import fleet
from paddle.distributed.auto_parallel.parallelizer import AutoParallelizer
from paddle.distributed.auto_parallel.partitioner import Partitioner
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.cluster import Cluster
......
......@@ -26,9 +26,6 @@ import paddle.utils as utils
from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.dist_context import get_default_distributed_context
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()
_global_parallel_strategy = None
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import unittest
import paddle.fluid as fluid
from test_parallel_dygraph_dataparallel import TestMultipleGpus
......
......@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import copy
import json
import unittest
import paddle
......@@ -22,13 +19,9 @@ import paddle.nn as nn
import paddle.static as static
import paddle.nn.functional as F
import paddle.utils as utils
from paddle.distributed import fleet
from paddle.distributed.fleet import auto
from paddle.distributed.auto_parallel.cluster import Cluster
from paddle.distributed.auto_parallel.utils import SerialProgramInfo
from paddle.distributed.auto_parallel.planner import PlanSpace, PlanFilter
from paddle.distributed.auto_parallel.planner import PlanSpace
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 OperatorDistributedAttribute
from paddle.distributed.auto_parallel.utils import update_op_dims_mapping_by_default_dist_impl
......
......@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest
import copy
import numpy as np
import paddle
import paddle.nn as nn
......@@ -23,11 +20,8 @@ import paddle.nn.functional as F
import paddle.utils as utils
import paddle.fluid.core as core
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.dist_context import DistributedContext, DistributedOperatorContext
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute, TensorDistributedAttribute
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute
from paddle.distributed.auto_parallel.dist_op import DistributedOperator
paddle.enable_static()
......
......@@ -12,9 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest
import copy
import numpy as np
import paddle
import paddle.nn as nn
......@@ -23,11 +20,8 @@ import paddle.nn.functional as F
import paddle.utils as utils
import paddle.fluid.core as core
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.dist_context import DistributedContext, DistributedOperatorContext
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute, TensorDistributedAttribute
from paddle.distributed.auto_parallel.dist_attribute import OperatorDistributedAttribute
from paddle.distributed.auto_parallel.dist_op import DistributedOperator
paddle.enable_static()
......
......@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from decorator_helper import prog_scope
import unittest
import paddle.fluid as fluid
import numpy as np
......
......@@ -13,15 +13,10 @@
# limitations under the License.
import unittest
import numpy
import paddle.fluid as fluid
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.executor import Executor
from paddle.fluid import framework
from test_imperative_base import new_program_scope
import numpy as np
class TestBasicGRUApiName(unittest.TestCase):
......
......@@ -14,11 +14,8 @@
import unittest
import numpy as np
import random
from op_test import OpTest
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
from op_test import OpTest, skip_check_grad_ci
from op_test import OpTest
import paddle.fluid.core as core
......
......@@ -12,14 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import unittest
import numpy as np
import paddle.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid as fluid
from op_test import OpTest, _set_use_system_allocator
from paddle.fluid.framework import grad_var_name, _test_eager_guard
from paddle.fluid.framework import _test_eager_guard
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
import paddle
......
......@@ -15,10 +15,8 @@
import unittest
import numpy as np
import paddle.fluid as fluid
from paddle.io import BatchSampler, Dataset, Sampler, SequenceSampler, \
RandomSampler, WeightedRandomSampler
from paddle.io import DistributedBatchSampler
IMAGE_SIZE = 32
......
......@@ -16,7 +16,6 @@ import paddle
import paddle.fluid as fluid
import numpy as np
import unittest
from op_test import OpTest
from paddle.fluid.framework import _test_eager_guard
......
......@@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
from paddle.fluid.op import Operator, DynamicRecurrentOp
from paddle.fluid.op import Operator
import paddle.fluid.core as core
import unittest
import numpy as np
......
......@@ -16,7 +16,6 @@ import unittest
import paddle
from op_test import OpTest
import numpy as np
import os
def output_hist(out):
......
......@@ -15,7 +15,6 @@
import unittest
import numpy as np
from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid
import paddle
from paddle.fluid import Program, program_guard
......
......@@ -14,8 +14,7 @@
import unittest
import numpy as np
from op_test import OpTest, _in_eager_without_dygraph_check
import paddle.fluid.core as core
from op_test import OpTest
import paddle.fluid as fluid
import paddle
from paddle.fluid import Program, program_guard
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import unittest
from op_test import OpTest
import paddle
import paddle.fluid as fluid
......
......@@ -18,8 +18,6 @@ import tempfile
import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
from op_test import OpTest
import paddle.inference as paddle_infer
from paddle.fluid.framework import in_dygraph_mode
......
......@@ -17,8 +17,6 @@ import numpy as np
from op_test import OpTest
import paddle
import paddle.fluid as fluid
import paddle.tensor as tensor
from paddle.fluid import Program, program_guard
class TestBmmOp(OpTest):
......
......@@ -14,10 +14,7 @@
import unittest
import numpy as np
import sys
import math
from op_test import OpTest
import copy
def box_clip(input_box, im_info, output_box):
......
......@@ -14,8 +14,6 @@
import unittest
import numpy as np
import sys
import math
from op_test import OpTest
import paddle
import paddle.fluid.core as core
......
......@@ -14,8 +14,6 @@
import unittest
import numpy as np
import sys
import math
from op_test import OpTest
......
......@@ -14,10 +14,6 @@
import paddle
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 unittest
from paddle.fluid.layers.nn import _pull_box_sparse
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import unittest
import numpy as np
import paddle
......
......@@ -17,7 +17,6 @@ import numpy as np
import paddle
import paddle.fluid.core as core
from op_test import OpTest
from test_collective_base import TestDistBase
import random
......
......@@ -14,9 +14,8 @@
import unittest
import numpy as np
from op_test import OpTest
import paddle.fluid as fluid
from paddle.fluid import compiler, Program, program_guard
from paddle.fluid import Program, program_guard
import paddle
paddle.enable_static()
......
......@@ -12,14 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from re import X
import unittest
import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
np.random.seed(10)
......
......@@ -14,12 +14,10 @@
import paddle
import paddle.fluid as fluid
from paddle.fluid.framework import Parameter
import numpy as np
from simple_nets import simple_fc_net
import random
import unittest
import os
batch_size = 32
......
......@@ -14,7 +14,6 @@
import unittest
import paddle
import paddle.fluid.core as core
import paddle.fluid as fluid
......
......@@ -13,11 +13,6 @@
# limitations under the License.
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
TestCEmbeddingCPU()
......
......@@ -18,7 +18,7 @@ import numpy as np
import paddle
import paddle.fluid.core as core
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 paddle.fluid.framework import _test_eager_guard
import gradient_checker
......
......@@ -15,7 +15,6 @@
import unittest
import numpy as np
from op_test import OpTest
import paddle.fluid.core as core
import paddle.fluid as fluid
......
......@@ -13,15 +13,9 @@
# limitations under the License.
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
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
......
......@@ -128,10 +128,8 @@ class TestCholeskySingularAPI(unittest.TestCase):
fetch_list=[result])
except RuntimeError as ex:
print("The mat is singular")
pass
except ValueError as ex:
print("The mat is singular")
pass
def test_static(self):
for place in self.places:
......@@ -148,10 +146,8 @@ class TestCholeskySingularAPI(unittest.TestCase):
result = paddle.cholesky(input)
except RuntimeError as ex:
print("The mat is singular")
pass
except ValueError as ex:
print("The mat is singular")
pass
if __name__ == "__main__":
......
......@@ -14,7 +14,6 @@
import unittest
import numpy as np
from op_test import OpTest
import numpy as np
from paddle.fluid import Program, program_guard
from paddle import fluid
......
......@@ -14,8 +14,6 @@
import unittest
import numpy as np
import math
import random
import paddle
import paddle.fluid.core as core
from op_test import OpTest
......
......@@ -14,8 +14,6 @@
import unittest
import numpy as np
import math
import sys
from op_test import OpTest
......
......@@ -14,19 +14,14 @@
import numpy as np
import unittest
import time
import argparse
import os
import sys
import subprocess
import traceback
import functools
import pickle
import tempfile
from contextlib import closing
import paddle
import paddle.fluid as fluid
import paddle.fluid.unique_name as nameGen
from paddle.fluid import core
......@@ -157,7 +152,6 @@ def runtime_main(test_class, col_type):
model.run_trainer(args)
import paddle.compat as cpt
import socket
from contextlib import closing
......
......@@ -15,12 +15,9 @@
import numpy as np
import unittest
import time
import argparse
import os
import sys
import subprocess
import traceback
import functools
import pickle
import tempfile
from contextlib import closing
......@@ -130,7 +127,6 @@ def runtime_main(test_class, col_type, sub_type):
model.run_trainer(args)
import paddle.compat as cpt
import socket
from contextlib import closing
......
......@@ -15,8 +15,6 @@
import os
import unittest
import time
import threading
import numpy
import paddle
......
......@@ -15,7 +15,6 @@
import os
import sys
import time
import threading
import subprocess
import unittest
import numpy
......
......@@ -15,8 +15,6 @@
import os
import unittest
import time
import threading
import numpy
import tempfile
import paddle
......
......@@ -17,7 +17,6 @@ import unittest
import numpy as np
import paddle
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
def create_test_not_equal_class(op_type, typename, callback):
......
......@@ -13,7 +13,6 @@
# limitations under the License.
import unittest
import paddle
import numpy as np
import paddle.fluid as fluid
import paddle.fluid.dygraph as dg
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from paddle import fluid, tensor
from paddle import fluid
import paddle
import paddle.fluid.dygraph as dg
import numpy as np
......
......@@ -14,7 +14,6 @@
import unittest
import numpy as np
import paddle
from numpy.random import random as rand
from paddle import tensor
import paddle.fluid as fluid
......
......@@ -16,7 +16,7 @@ import unittest
import numpy as np
from paddle.fluid.tests.unittests.op_test import OpTest, skip_check_grad_ci, convert_float_to_uint16
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
import paddle
import gradient_checker
......
......@@ -15,12 +15,10 @@
import unittest
import numpy as np
import paddle
import paddle.fluid.core as core
import sys
sys.path.append("..")
from op_test import OpTest
from paddle.fluid import Program, program_guard
import paddle.fluid.dygraph as dg
import paddle.static as static
from numpy.random import random as rand
......
......@@ -17,7 +17,6 @@ import paddle
from paddle import fluid, nn
import paddle.fluid.dygraph as dg
import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest
......
......@@ -17,7 +17,6 @@ import paddle
from paddle import fluid, nn
import paddle.fluid.dygraph as dg
import paddle.nn.functional as F
import paddle.fluid.initializer as I
import unittest
......
......@@ -20,8 +20,6 @@ import paddle
paddle.enable_static()
import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest
from paddle.fluid import Program, program_guard
class TestConv2DAPI(unittest.TestCase):
......
......@@ -19,9 +19,6 @@ import paddle
paddle.enable_static()
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
#----------------TestDepthwiseConv -----
......
......@@ -18,9 +18,6 @@ import numpy as np
import paddle
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
......
......@@ -19,7 +19,6 @@ import paddle
paddle.enable_static()
import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest
......
......@@ -17,7 +17,6 @@ import numpy as np
import paddle.fluid.core as core
import paddle.fluid as fluid
from op_test import OpTest
from test_conv3d_transpose_op import TestConv3DTransposeOp
......
......@@ -15,10 +15,7 @@
import paddle.fluid as fluid
import unittest
import numpy as np
import six
import paddle
import warnings
import sys
np_minor_version = int((np.__version__).split('.')[1])
......
......@@ -14,7 +14,6 @@
import unittest
import numpy as np
from op_test import OpTest
import paddle
import paddle.nn as nn
import paddle.nn.functional as F
......
......@@ -15,9 +15,7 @@
import unittest
import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid import Program, program_guard
np.random.seed(10)
......
......@@ -15,9 +15,8 @@
import paddle.fluid as fluid
import unittest
import numpy as np
import six
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):
......
......@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os, shutil
import unittest
import numpy as np
import paddle.fluid as fluid
......
......@@ -12,12 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os, shutil
import unittest
import numpy as np
import paddle.fluid as fluid
from paddle.fluid import Program, program_guard
from paddle.fluid import ParamAttr, initializer
import paddle
......
......@@ -14,7 +14,6 @@
import unittest
import numpy as np
import paddle.fluid.core as core
from op_test import OpTest
import paddle
import paddle.fluid as fluid
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册