nn_test.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:complex_tf 作者: woodshop 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号