提交 94c8ce3f 编写于 作者: M minqiyang 提交者: ceci3

reduce ut time

test=develop
上级 c90b82a6
......@@ -136,10 +136,7 @@ class VarBase {
public:
virtual ~VarBase() {
if (block_ && !persistable_) {
block_->RemoveVar(name_);
}
// TODO(minqiyang): remove var desc from block desc
if (var_) {
delete var_;
var_ = nullptr;
......
......@@ -243,7 +243,7 @@ class TestImperativePtbRnn(unittest.TestCase):
dy_loss = None
last_hidden = None
last_cell = None
batch_num = 200
batch_num = 50
for i in range(batch_num):
x_data = np.arange(12).reshape(4, 3).astype('int64')
......
......@@ -231,7 +231,7 @@ class TestImperativeResnet(unittest.TestCase):
seed = 90
batch_size = train_parameters["batch_size"]
batch_num = 50
batch_num = 20
with fluid.imperative.guard():
fluid.default_startup_program().random_seed = seed
fluid.default_main_program().random_seed = seed
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册