test_tensor_node.py 文件源码

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

项目:nengo_dl 作者: nengo 项目源码 文件源码
def test_reshaped():
    x = tf.zeros((5, 12))

    @reshaped((4, 3))
    def my_func(_, a):
        with tf.control_dependencies([tf.assert_equal(tf.shape(a),
                                                      (5, 4, 3))]):
            return tf.identity(a)

    y = my_func(None, x)

    with tf.Session() as sess:
        sess.run(y)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号