码迷,mamicode.com
首页 > 其他好文 > 详细

TensorFlow Ones,Zeros

时间:2017-11-28 18:45:56      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:project   details   bsp   source   types   detail   import   port   print   

 

 

import tensorflow as tf
b = tf.ones([2,4])+1
sess = tf.Session();
print(sess.run(b));

 

输出:

[[ 2.  2.  2.  2.]
 [ 2.  2.  2.  2.]]

 

参考链接

http://wiki.jikexueyuan.com/project/tensorflow-zh/resources/dims_types.html

什么是张量

http://blog.csdn.net/u014595019/article/details/52805444

常用函数说明

TensorFlow Ones,Zeros

标签:project   details   bsp   source   types   detail   import   port   print   

原文地址:http://www.cnblogs.com/guolaomao/p/7911222.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!