1. 程式人生 > >TensorFlow Ones,Zeros

TensorFlow Ones,Zeros

pro span type resources orf pan 常用 one 常用函數

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