美文网首页
[tf]placeholder如果只是传递一个数字那么shape

[tf]placeholder如果只是传递一个数字那么shape

作者: VanJordan | 来源:发表于2019-01-22 14:17 被阅读14次
    • shape可以写成[]或者None
    import tensorflow as tf
    import numpy as np
    a = tf.placeholder(shape=[],dtype=tf.int32,name='ab')
    with tf.Session() as sess:
        print(sess.run(a,feed_dict={'ab:0':1}))
    

    相关文章

      网友评论

          本文标题:[tf]placeholder如果只是传递一个数字那么shape

          本文链接:https://www.haomeiwen.com/subject/covljqtx.html