tf.fill

2017-09-21  本文已影响0人  sterio
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:


上一篇 下一篇

猜你喜欢

热点阅读