def testCplxL2Loss(self):
for dtype in [tf.complex64]:
with self.test_session(force_gpu=True):
x = tf.constant([1.0+1.0j, 0.0-2.0j, 3.0-0.0j, 2.0+1.0j], shape=[2, 2],
name="x", dtype=dtype)
l2loss = ctf.nn.cplx_l2_loss(x)
value = l2loss.eval()
self.assertAllClose(10.0, value)
评论列表
文章目录