网络编程
位置:首页>> 网络编程>> Python编程>> TensorFlow 合并/连接数组的方法

TensorFlow 合并/连接数组的方法

作者:guotong1988  发布时间:2021-08-19 16:28:35 

标签:TensorFlow,合并,连接,数组

如下所示:


import tensorflow as tf

a = tf.Variable([4,5,6])
b = tf.Variable([1,2,3])

c = tf.concat(0,[a,b])

init_op = tf.initialize_all_variables()

with tf.Session() as sess:
sess.run(init_op)
print(sess.run(c))

结果打印:


[4 5 6 1 2 3]

来源:https://blog.csdn.net/guotong1988/article/details/53883567

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com