tf.sequence_mask
tf.sequence_mask
>>> x=[1,2,3]
>>> z=tf.sequence_mask(x)
>>> sess.run(z)
array([[ True, False, False],
[ True, True, False],
[ True, True, True]])
tf.sequence_mask
>>> x=[1,2,3]
>>> z=tf.sequence_mask(x)
>>> sess.run(z)
array([[ True, False, False],
[ True, True, False],
[ True, True, True]])