layers_test.py 文件源码

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

项目:fold 作者: tensorflow 项目源码 文件源码
def test_fc_raises(self):
    six.assertRaisesRegex(
        self, TypeError, 'FC input dtype must be float32', tdl.FC(1),
        tf.constant([0], dtype='int64'))
    six.assertRaisesRegex(
        self, TypeError, 'FC input shape must be 1D', tdl.FC(1),
        tf.constant(0, dtype='float32'))
    fc = tdl.FC(1)
    fc(tf.constant([[0]], 'float32'))
    six.assertRaisesRegex(
        self, TypeError, 'Type mismatch between input type', fc,
        tf.constant([[0, 0]], 'float32'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号