From 179363a15c41175e2174e9cf031006a24a3efc75 Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Wed, 16 Jan 2019 10:46:47 +0800 Subject: [PATCH] polish codes test=develop --- python/paddle/fluid/tests/unittests/test_imperative_gan.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_imperative_gan.py b/python/paddle/fluid/tests/unittests/test_imperative_gan.py index 410c75026..e0507e0b9 100644 --- a/python/paddle/fluid/tests/unittests/test_imperative_gan.py +++ b/python/paddle/fluid/tests/unittests/test_imperative_gan.py @@ -171,16 +171,11 @@ class TestImperativeMnist(unittest.TestCase): fluid.layers.sigmoid_cross_entropy_with_logits( x=d_fake, label=to_variable(np.ones([2, 1], np.float32)))) g_loss._backward() - sgd = SGDOptimizer(learning_rate=1e-3) sgd.minimize(g_loss) for p in discriminator.parameters(): dy_params[p.name] = p._numpy() - sys.stderr.write('dy_param_loss: %s: %s\n' % - (p.name, np.sum(dy_params[p.name]))) for p in generator.parameters(): dy_params[p.name] = p._numpy() - sys.stderr.write('dy_param_loss: %s: %s\n' % - (p.name, np.sum(dy_params[p.name]))) dy_g_loss = g_loss._numpy() dy_d_loss = d_loss._numpy() -- GitLab