From 91f8531586cf197e8910a89b01a9ee692981fd95 Mon Sep 17 00:00:00 2001
From: dengkaipeng <dengkaipeng@baidu.com>
Date: Fri, 22 Feb 2019 11:24:26 +0800
Subject: [PATCH] refine test_spectral_norm. test=develop

---
 python/paddle/fluid/tests/unittests/test_spectral_norm_op.py | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/python/paddle/fluid/tests/unittests/test_spectral_norm_op.py b/python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
index 549ed486d71..81cc38a1318 100644
--- a/python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
+++ b/python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
@@ -29,9 +29,6 @@ def spectral_norm(weight, u, v, dim, power_iters, eps):
     if dim != 0:
         perm = [dim] + [d for d in range(len(shape)) if d != dim]
         weight_mat = weight_mat.transpose(perm)
-        real_shape = weight_mat.shape
-    else:
-        real_shape = shape
     weight_mat = weight_mat.reshape((h, w))
 
     u = u.reshape((h, 1))
-- 
GitLab