提交 91f85315 编写于 作者: D dengkaipeng 提交者: ceci3

refine test_spectral_norm. test=develop

上级 12416a24
...@@ -29,9 +29,6 @@ def spectral_norm(weight, u, v, dim, power_iters, eps): ...@@ -29,9 +29,6 @@ def spectral_norm(weight, u, v, dim, power_iters, eps):
if dim != 0: if dim != 0:
perm = [dim] + [d for d in range(len(shape)) if d != dim] perm = [dim] + [d for d in range(len(shape)) if d != dim]
weight_mat = weight_mat.transpose(perm) weight_mat = weight_mat.transpose(perm)
real_shape = weight_mat.shape
else:
real_shape = shape
weight_mat = weight_mat.reshape((h, w)) weight_mat = weight_mat.reshape((h, w))
u = u.reshape((h, 1)) u = u.reshape((h, 1))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册