提交 bde090a9 编写于 作者: L Luo Tao

replace paddle.v2.fluid by paddle.fluid in tests

上级 f7fa7c57
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from paddle.v2.fluid import framework as framework
from paddle.fluid import framework as framework
from . import core
import collections
import copy
......
......@@ -26,7 +26,7 @@ A `scoped_function` will take a `function` as input. That function will be
invoked in a new local scope.
"""
import paddle.v2.fluid.core
import paddle.fluid.core
import threading
__tl_scope__ = threading.local()
......@@ -44,13 +44,13 @@ __all__ = [
def get_cur_scope():
"""
Get current scope.
:rtype: paddle.v2.fluid.core.Scope
:rtype: paddle.fluid.core.Scope
"""
cur_scope_stack = getattr(__tl_scope__, 'cur_scope', None)
if cur_scope_stack is None:
__tl_scope__.cur_scope = list()
if len(__tl_scope__.cur_scope) == 0:
__tl_scope__.cur_scope.append(paddle.v2.fluid.core.Scope())
__tl_scope__.cur_scope.append(paddle.fluid.core.Scope())
return __tl_scope__.cur_scope[-1]
......
......@@ -14,8 +14,8 @@
import os
from paddle.v2.fluid.evaluator import Evaluator
from paddle.v2.fluid.framework import Program, Parameter, default_main_program, Variable
from paddle.fluid.evaluator import Evaluator
from paddle.fluid.framework import Program, Parameter, default_main_program, Variable
from . import core
__all__ = [
......
......@@ -17,7 +17,7 @@ import itertools
from framework import Variable, Parameter, default_main_program, default_startup_program, dtype_is_floating
import unique_name
from paddle.v2.fluid.initializer import Constant, Xavier
from paddle.fluid.initializer import Constant, Xavier
from param_attr import ParamAttr, WeightNormParamAttr
......
......@@ -17,8 +17,8 @@ import json
import logging
from collections import defaultdict
import paddle.v2.fluid.core as core
import paddle.v2.fluid.proto.framework_pb2 as framework_pb2
import paddle.fluid.core as core
import paddle.fluid.proto.framework_pb2 as framework_pb2
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
......
......@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid.core as core
import paddle.v2.fluid.proto.framework_pb2 as framework_pb2
import paddle.fluid.core as core
import paddle.fluid.proto.framework_pb2 as framework_pb2
def get_all_op_protos():
......
......@@ -14,15 +14,15 @@
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid.layers as layers
import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.fluid.framework as framework
import paddle.fluid.layers as layers
import contextlib
import math
import sys
import unittest
from paddle.v2.fluid.executor import Executor
from paddle.fluid.executor import Executor
dict_size = 30000
source_dict_dim = target_dict_dim = dict_size
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import contextlib
import numpy
import unittest
......
......@@ -15,7 +15,7 @@
from __future__ import print_function
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import contextlib
import math
import sys
......
......@@ -17,8 +17,8 @@ import math
import numpy as np
import paddle.v2 as paddle
import paddle.v2.dataset.conll05 as conll05
import paddle.v2.fluid as fluid
from paddle.v2.fluid.initializer import init_on_cpu
import paddle.fluid as fluid
from paddle.fluid.initializer import init_on_cpu
import contextlib
import time
import unittest
......
......@@ -15,10 +15,10 @@ import contextlib
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid.layers as pd
from paddle.v2.fluid.executor import Executor
import paddle.fluid as fluid
import paddle.fluid.framework as framework
import paddle.fluid.layers as pd
from paddle.fluid.executor import Executor
import unittest
dict_size = 30000
......
......@@ -13,7 +13,7 @@
# limitations under the License.
from __future__ import print_function
import argparse
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import paddle.v2 as paddle
import sys
import numpy
......
......@@ -16,12 +16,12 @@ import math
import sys
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.nets as nets
from paddle.v2.fluid.executor import Executor
from paddle.v2.fluid.optimizer import SGDOptimizer
import paddle.fluid as fluid
import paddle.fluid.framework as framework
import paddle.fluid.layers as layers
import paddle.fluid.nets as nets
from paddle.fluid.executor import Executor
from paddle.fluid.optimizer import SGDOptimizer
IS_SPARSE = True
USE_GPU = False
......
......@@ -14,7 +14,7 @@
from __future__ import print_function
import unittest
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import paddle.v2 as paddle
import contextlib
import math
......
......@@ -12,7 +12,7 @@
# limitations under the License.
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import unittest
import os
import numpy as np
......
......@@ -14,7 +14,7 @@
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import os
x = fluid.layers.data(name='x', shape=[13], dtype='float32')
......
......@@ -15,7 +15,7 @@
from __future__ import print_function
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import os
import sys
......
......@@ -17,7 +17,7 @@ import math
import numpy as np
import paddle.v2 as paddle
import paddle.v2.dataset.conll05 as conll05
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import time
import os
......
......@@ -15,7 +15,7 @@
from __future__ import print_function
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import os
PASS_NUM = 100
......
......@@ -14,11 +14,11 @@
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid.layers as layers
from paddle.v2.fluid.executor import Executor
import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.fluid.framework as framework
import paddle.fluid.layers as layers
from paddle.fluid.executor import Executor
import os
dict_size = 30000
......
......@@ -15,7 +15,7 @@
from __future__ import print_function
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import os
images = fluid.layers.data(name='pixel', shape=[1, 28, 28], dtype='float32')
......
......@@ -15,7 +15,7 @@
from __future__ import print_function
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import os
BATCH_SIZE = 128
......
......@@ -15,11 +15,11 @@
import numpy as np
import os
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.nets as nets
from paddle.v2.fluid.optimizer import SGDOptimizer
import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.fluid.layers as layers
import paddle.fluid.nets as nets
from paddle.fluid.optimizer import SGDOptimizer
IS_SPARSE = True
BATCH_SIZE = 256
......
......@@ -16,7 +16,7 @@ from __future__ import print_function
import os
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
def convolution_net(data, label, input_dim, class_dim=2, emb_dim=32,
......
......@@ -15,7 +15,7 @@
import numpy as np
import os
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
def stacked_lstm_net(data,
......
......@@ -14,7 +14,7 @@
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import math
import sys
......
......@@ -17,7 +17,7 @@ from __future__ import print_function
import sys
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import math
import sys
......
......@@ -14,11 +14,11 @@
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid.layers as layers
from paddle.v2.fluid.executor import Executor
import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.fluid.framework as framework
import paddle.fluid.layers as layers
from paddle.fluid.executor import Executor
import math
import sys
......
......@@ -20,7 +20,7 @@ import matplotlib
import numpy
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
matplotlib.use('Agg')
import matplotlib.pyplot as plt
......
......@@ -13,9 +13,9 @@
# limitations under the License.
import unittest
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
from paddle.v2.fluid.executor import Executor
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid.executor import Executor
class TestRoutineOp(unittest.TestCase):
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
class TestCSPFramework(unittest.TestCase):
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import numpy as np
prog = fluid.framework.Program()
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
def test_converter():
......
......@@ -13,9 +13,9 @@
# limitations under the License.
from __future__ import print_function
import paddle.v2.fluid as fluid
import paddle.v2.fluid.layers as layers
from paddle.v2.fluid.framework import Program, program_guard
import paddle.fluid as fluid
import paddle.fluid.layers as layers
from paddle.fluid.framework import Program, program_guard
import unittest
......
......@@ -15,7 +15,7 @@
from __future__ import print_function
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
BATCH_SIZE = 128
CLIP_MAX = 2e-6
......
......@@ -14,7 +14,7 @@
import numpy as np
import paddle.v2 as paddle
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
BATCH_SIZE = 128
CLIP = 1
......
......@@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid.layers as layers
from paddle.v2.fluid.framework import Program, program_guard, default_main_program, default_startup_program
from paddle.v2.fluid.executor import Executor
from paddle.v2.fluid.optimizer import MomentumOptimizer
import paddle.v2.fluid.core as core
import paddle.fluid.layers as layers
from paddle.fluid.framework import Program, program_guard, default_main_program, default_startup_program
from paddle.fluid.executor import Executor
from paddle.fluid.optimizer import MomentumOptimizer
import paddle.fluid.core as core
import paddle.v2 as paddle
import unittest
import numpy as np
......
......@@ -16,9 +16,9 @@ import unittest
import numpy as np
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid as fluid
import paddle.fluid.layers as layers
import paddle.fluid.framework as framework
import paddle.fluid as fluid
class TestPythonOperatorOverride(unittest.TestCase):
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
__all__ = ['many_times', 'prog_scope']
......
......@@ -16,12 +16,12 @@ import unittest
import numpy as np
import random
import itertools
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
import collections
from paddle.v2.fluid.backward import append_backward
from paddle.v2.fluid.op import Operator
from paddle.v2.fluid.executor import Executor
from paddle.v2.fluid.framework import Program, OpProtoHolder
from paddle.fluid.backward import append_backward
from paddle.fluid.op import Operator
from paddle.fluid.executor import Executor
from paddle.fluid.framework import Program, OpProtoHolder
def randomize_probability(batch_size, class_num, dtype='float32'):
......
......@@ -14,8 +14,8 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
from paddle.v2.fluid.op import Operator
import paddle.fluid.core as core
from paddle.fluid.op import Operator
from op_test import OpTest
import math
......
......@@ -15,8 +15,8 @@
import unittest
import numpy as np
from op_test import OpTest
from paddle.v2.fluid import core
from paddle.v2.fluid.op import Operator
from paddle.fluid import core
from paddle.fluid.op import Operator
class TestAdamOp1(OpTest):
......
......@@ -13,11 +13,11 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.core as core
import paddle.v2.fluid.layers as layers
from paddle.v2.fluid.executor import Executor
from paddle.v2.fluid.backward import append_backward
from paddle.v2.fluid.framework import default_main_program
import paddle.fluid.core as core
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
import numpy
......
......@@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid as fluid
import paddle.v2.fluid.layers as layers
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import op_test
import numpy
import unittest
import paddle.v2.fluid.framework as framework
import paddle.fluid.framework as framework
class TestAssignValueOp(op_test.OpTest):
......
......@@ -15,9 +15,9 @@
import unittest
import numpy as np
from op_test import OpTest
import paddle.v2.fluid.core as core
from paddle.v2.fluid.op import Operator
from paddle.v2.fluid.framework import grad_var_name
import paddle.fluid.core as core
from paddle.fluid.op import Operator
from paddle.fluid.framework import grad_var_name
def get_backward_op(scope, op, no_grad_set):
......
......@@ -15,8 +15,8 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
from paddle.v2.fluid.op import Operator
import paddle.fluid.core as core
from paddle.fluid.op import Operator
class TestBeamSearchDecodeOp(unittest.TestCase):
......
......@@ -13,8 +13,8 @@
# limitations under the License.
import logging
from paddle.v2.fluid.op import Operator, DynamicRecurrentOp
import paddle.v2.fluid.core as core
from paddle.fluid.op import Operator, DynamicRecurrentOp
import paddle.fluid.core as core
import unittest
import numpy as np
......
......@@ -14,11 +14,11 @@
import unittest
import paddle.v2.fluid as fluid
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid.optimizer as optimizer
from paddle.v2.fluid.backward import calc_gradient
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.fluid.framework as framework
import paddle.fluid.optimizer as optimizer
from paddle.fluid.backward import calc_gradient
class TestCalcGradient(unittest.TestCase):
......
......@@ -15,7 +15,7 @@
import op_test
import unittest
import numpy as np
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
class TestCastOp(op_test.OpTest):
......
......@@ -13,10 +13,10 @@
# limitations under the License.
import logging
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
import unittest
import numpy as np
from paddle.v2.fluid.op import Operator, CondOp
from paddle.fluid.op import Operator, CondOp
class PySimpleCond(object):
......
......@@ -13,11 +13,11 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.core as core
from paddle.v2.fluid.framework import default_startup_program, default_main_program
from paddle.v2.fluid.executor import Executor
from paddle.v2.fluid.backward import append_backward
import paddle.fluid.layers as layers
import paddle.fluid.core as core
from paddle.fluid.framework import default_startup_program, default_main_program
from paddle.fluid.executor import Executor
from paddle.fluid.backward import append_backward
import numpy
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.framework as framework
import paddle.fluid.framework as framework
class ConditionalBlock(unittest.TestCase):
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
from op_test import OpTest
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
from op_test import OpTest
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
from op_test import OpTest
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
from op_test import OpTest
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.layers as layers
import paddle.fluid.layers as layers
class TestDocString(unittest.TestCase):
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from paddle.v2.fluid.default_scope_funcs import *
from paddle.fluid.default_scope_funcs import *
import unittest
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import paddle.v2 as paddle
import unittest
import numpy
......
......@@ -15,7 +15,7 @@
import numpy
import random
import collections
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import unittest
from decorators import *
......
......@@ -14,11 +14,11 @@
import unittest
import paddle.v2 as paddle
import paddle.v2.fluid.core as core
import paddle.v2.fluid as fluid
from paddle.v2.fluid.backward import append_backward
import paddle.v2.fluid.framework as framework
from paddle.v2.fluid.framework import Program, switch_main_program
import paddle.fluid.core as core
import paddle.fluid as fluid
from paddle.fluid.backward import append_backward
import paddle.fluid.framework as framework
from paddle.fluid.framework import Program, switch_main_program
import bisect
import numpy as np
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
import unittest
......
......@@ -15,10 +15,10 @@
import unittest
import numpy
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
from paddle.v2.fluid.executor import Executor
from paddle.v2.fluid.layers import mul, data
from paddle.fluid.executor import Executor
from paddle.fluid.layers import mul, data
class TestExecutor(unittest.TestCase):
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
import unittest
import numpy as np
......
......@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid as fluid
import paddle.v2.fluid.layers as layers
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import op_test
import numpy
import unittest
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
from op_test import OpTest
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
class TestFillOp(OpTest):
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
from paddle.v2.fluid.framework import Program
from paddle.fluid.framework import Program
class TestDebugStringFramework(unittest.TestCase):
......
......@@ -15,10 +15,10 @@
import unittest
import numpy
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
from paddle.v2.fluid.op import Operator
from paddle.v2.fluid.executor import Executor
import paddle.fluid as fluid
import paddle.fluid.core as core
from paddle.fluid.op import Operator
from paddle.fluid.executor import Executor
class TestGaussianRandomOp(unittest.TestCase):
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import decorators
import unittest
......
......@@ -14,9 +14,9 @@
import unittest
import paddle.v2.fluid as fluid
import paddle.v2.fluid.nets as nets
from paddle.v2.fluid.framework import Program
import paddle.fluid as fluid
import paddle.fluid.nets as nets
from paddle.fluid.framework import Program
def conv_block(input, num_filter, groups, dropouts):
......
......@@ -14,7 +14,7 @@
import unittest
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
class TestInferShape(unittest.TestCase):
......
......@@ -15,13 +15,13 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
import paddle.v2.fluid.executor as executor
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.optimizer as optimizer
from paddle.v2.fluid.framework import Program, program_guard
from paddle.v2.fluid.io import save_inference_model, load_inference_model
import paddle.fluid.executor as executor
import paddle.fluid.layers as layers
import paddle.fluid.optimizer as optimizer
from paddle.fluid.framework import Program, program_guard
from paddle.fluid.io import save_inference_model, load_inference_model
class TestBook(unittest.TestCase):
......
......@@ -15,8 +15,8 @@
import numpy as np
import unittest
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid.initializer as initializer
import paddle.fluid.framework as framework
import paddle.fluid.initializer as initializer
DELTA = 0.00001
......
......@@ -14,8 +14,8 @@
import unittest
import numpy as np
from paddle.v2.fluid.op import Operator
import paddle.v2.fluid.core as core
from paddle.fluid.op import Operator
import paddle.fluid.core as core
def create_tensor(scope, name, np_data):
......
......@@ -16,9 +16,9 @@ import numpy as np
from operator import mul
from op_test import OpTest
import paddle.v2.fluid.core as core
from paddle.v2.fluid.op import Operator
from paddle.v2.fluid.framework import grad_var_name
import paddle.fluid.core as core
from paddle.fluid.op import Operator
from paddle.fluid.framework import grad_var_name
np.random.random(123)
......
......@@ -15,10 +15,10 @@
from __future__ import print_function
import unittest
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.nets as nets
from paddle.v2.fluid.framework import Program, program_guard, default_main_program
from paddle.v2.fluid.param_attr import ParamAttr
import paddle.fluid.layers as layers
import paddle.fluid.nets as nets
from paddle.fluid.framework import Program, program_guard, default_main_program
from paddle.fluid.param_attr import ParamAttr
import decorators
......
......@@ -17,10 +17,10 @@ import unittest
import math
import copy
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid as fluid
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.learning_rate_decay as lr_decay
import paddle.fluid.framework as framework
import paddle.fluid as fluid
import paddle.fluid.layers as layers
import paddle.fluid.learning_rate_decay as lr_decay
def exponential_decay(learning_rate,
......
......@@ -13,9 +13,9 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.layers as layers
from paddle.v2.fluid.executor import Executor
import paddle.v2.fluid.core as core
import paddle.fluid.layers as layers
from paddle.fluid.executor import Executor
import paddle.fluid.core as core
import numpy
......
......@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from paddle.v2.fluid.layers import lod_rank_table, data
from paddle.v2.fluid.executor import Executor
import paddle.v2.fluid.core as core
from paddle.fluid.layers import lod_rank_table, data
from paddle.fluid.executor import Executor
import paddle.fluid.core as core
import numpy
import unittest
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
import numpy
......
......@@ -13,12 +13,12 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
import numpy
import paddle.v2.fluid.layers as layers
from paddle.v2.fluid.framework import Program, program_guard
from paddle.v2.fluid.executor import Executor
from paddle.v2.fluid.backward import append_backward
import paddle.fluid.layers as layers
from paddle.fluid.framework import Program, program_guard
from paddle.fluid.executor import Executor
from paddle.fluid.backward import append_backward
class TestCPULoDTensorArrayOps(unittest.TestCase):
......
......@@ -14,7 +14,7 @@
import unittest
import decorators
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import numpy
......
......@@ -15,10 +15,10 @@
from __future__ import print_function
import unittest
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.optimizer as optimizer
from paddle.v2.fluid.framework import Program, program_guard
from paddle.v2.fluid.memory_optimization_transpiler import memory_optimize
import paddle.fluid.layers as layers
import paddle.fluid.optimizer as optimizer
from paddle.fluid.framework import Program, program_guard
from paddle.fluid.memory_optimization_transpiler import memory_optimize
class TestControlFlowGraph(unittest.TestCase):
......
......@@ -13,8 +13,8 @@
# limitations under the License.
import unittest
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
import paddle.fluid as fluid
import paddle.fluid.core as core
import numpy as np
......
......@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid.core as core
from paddle.v2.fluid.op import Operator
import paddle.fluid.core as core
from paddle.fluid.op import Operator
import unittest
......
......@@ -13,8 +13,8 @@
# limitations under the License.
import unittest
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
import paddle.fluid as fluid
import paddle.fluid.core as core
import numpy as np
......
......@@ -16,10 +16,10 @@ import unittest
import numpy as np
import math
from op_test import OpTest
import paddle.v2.fluid as fluid
import paddle.v2.fluid.core as core
import paddle.v2.fluid.framework as framework
from paddle.v2.fluid.framework import Program, program_guard
import paddle.fluid as fluid
import paddle.fluid.core as core
import paddle.fluid.framework as framework
from paddle.fluid.framework import Program, program_guard
class TestOneHotOp(OpTest):
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
class TestOpSupportGPU(unittest.TestCase):
......
......@@ -14,8 +14,8 @@
import unittest
import paddle.v2.fluid.op as op
import paddle.v2.fluid.proto.framework_pb2 as framework_pb2
import paddle.fluid.op as op
import paddle.fluid.proto.framework_pb2 as framework_pb2
class TestGetAllProtos(unittest.TestCase):
......
......@@ -14,9 +14,9 @@
import unittest
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
from paddle.v2.fluid.framework import Program, default_startup_program
from paddle.fluid.framework import Program, default_startup_program
main_program = default_startup_program()
......
......@@ -14,9 +14,9 @@
import unittest
import paddle.v2.fluid.framework as framework
import paddle.v2.fluid.optimizer as optimizer
from paddle.v2.fluid.backward import append_backward
import paddle.fluid.framework as framework
import paddle.fluid.optimizer as optimizer
from paddle.fluid.backward import append_backward
class TestOptimizer(unittest.TestCase):
......
......@@ -14,7 +14,7 @@
import unittest
import paddle.v2.fluid as fluid
import paddle.fluid as fluid
import numpy
......
......@@ -13,11 +13,11 @@
# limitations under the License.
import unittest
from paddle.v2.fluid.framework import default_main_program
import paddle.v2.fluid.core as core
from paddle.v2.fluid.executor import Executor
import paddle.v2.fluid.io as io
from paddle.v2.fluid.initializer import ConstantInitializer
from paddle.fluid.framework import default_main_program
import paddle.fluid.core as core
from paddle.fluid.executor import Executor
import paddle.fluid.io as io
from paddle.fluid.initializer import ConstantInitializer
import numpy as np
main_program = default_main_program()
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
from op_test import OpTest
......
......@@ -15,7 +15,7 @@
import unittest
import numpy as np
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
from op_test import OpTest
......
......@@ -13,12 +13,12 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.core as core
from paddle.v2.fluid.executor import Executor
import paddle.v2.fluid.layers as layers
from paddle.v2.fluid.backward import append_backward
from paddle.v2.fluid.framework import switch_main_program
from paddle.v2.fluid.framework import Program
import paddle.fluid.core as core
from paddle.fluid.executor import Executor
import paddle.fluid.layers as layers
from paddle.fluid.backward import append_backward
from paddle.fluid.framework import switch_main_program
from paddle.fluid.framework import Program
import numpy as np
......
......@@ -15,10 +15,10 @@
import unittest
import os
import numpy as np
import paddle.v2.fluid as fluid
import paddle.v2.fluid.profiler as profiler
import paddle.v2.fluid.layers as layers
import paddle.v2.fluid.core as core
import paddle.fluid as fluid
import paddle.fluid.profiler as profiler
import paddle.fluid.layers as layers
import paddle.fluid.core as core
class TestProfiler(unittest.TestCase):
......
......@@ -15,8 +15,8 @@
from __future__ import print_function
import unittest
from paddle.v2.fluid.framework import Program, default_main_program, program_guard, grad_var_name
import paddle.v2.fluid.layers as layers
from paddle.fluid.framework import Program, default_main_program, program_guard, grad_var_name
import paddle.fluid.layers as layers
main_program = default_main_program()
......
......@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import paddle.v2.fluid.proto.framework_pb2 as framework_pb2
import paddle.fluid.proto.framework_pb2 as framework_pb2
import unittest
......
......@@ -13,7 +13,7 @@
# limitations under the License.
import unittest
import paddle.v2.fluid.core as core
import paddle.fluid.core as core
class TestOpDesc(unittest.TestCase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册