tf.stack

作者: yalesaleng | 来源:发表于2018-07-16 16:56 被阅读13次

tf.stack( values, axis = 0, name = 'stack')

For example:

x = tf.constant([1, 4])
y = tf.constant([2, 5])
z = tf.constant([3, 6])
tf.stack([x, y, z])  # [[1, 4], [2, 5], [3, 6]] (Pack along first dim.)
tf.stack([x, y, z], axis=1)  # [[1, 2, 3], [4, 5, 6]]

相关文章

网友评论

      本文标题:tf.stack

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