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: