tf.fill

作者: sterio | 来源:发表于2017-09-21 12:55 被阅读0次
    tf.fill(
        dims, # MUST be 1-D!!, type int32. . Represents the SHAPE of the output tensor.
        value, # MUST be 0-D scalar!! Value to the returned tensor.
        name=None # operation name
    )
    

    Example:

    import tensorflow as tf
    t1 = tf.fill([2,3,4], 3)
    sess = tf.Session()
    
    print(sess.run(t1))
    
    [[[3 3 3 3]
      [3 3 3 3]
      [3 3 3 3]]
    
     [[3 3 3 3]
      [3 3 3 3]
      [3 3 3 3]]]
    

    Case in seq2seq model:

    
    

    相关文章

      网友评论

          本文标题:tf.fill

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