TensorFlow 合并/连接数组的方法

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

如下所示:


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

标签:TensorFlow,合并,连接,数组
0
投稿

猜你喜欢

  • Bad Tags — html有害的标签

    2008-10-13 19:47:00
  • 一文带你搞懂Python中的数据容器

    2021-05-25 16:09:59
  • Django项目基础配置和基本使用过程解析

    2023-04-27 18:29:19
  • python中列表(list)和元组(tuple)的深入讲解

    2021-08-18 01:39:02
  • asp xmlhttp下载一句话

    2013-06-30 06:47:48
  • sqlserver 查询数据库大小的方法

    2012-08-21 10:22:10
  • PHP结合vue导出excel出现乱码的解决方法分享

    2023-05-30 09:18:25
  • Django 使用Ajax进行前后台交互的示例讲解

    2023-08-03 03:57:47
  • Asp无组件上传进度条解决方案

    2010-04-24 16:01:00
  • Python使用chardet判断字符编码

    2021-05-14 03:03:52
  • Opencv图像处理之详解掩膜mask

    2022-08-12 23:40:44
  • 解决python虚拟环境切换无效的问题

    2023-02-01 14:37:50
  • Python字典 dict几种遍历方式

    2023-01-14 19:48:28
  • python读写csv文件方法详细总结

    2022-11-03 20:46:04
  • js自定义网页右键菜单方法

    2007-11-28 12:50:00
  • php安全攻防利用文件上传漏洞与绕过技巧详解

    2023-07-23 12:08:06
  • Python实现扫描局域网活动ip(扫描在线电脑)

    2022-10-02 02:38:52
  • Python-pip配置国内镜像源的安装方式

    2023-08-22 21:55:38
  • 解决python -m pip install --upgrade pip 升级不成功问题

    2022-12-15 00:21:55
  • 如何更快更好地调试ASP程序代码?

    2009-11-23 20:13:00
  • asp之家 网络编程 m.aspxhome.com