官术网_书友最值得收藏!

Tensors generated from library functions

Tensors can also be generated from various TensorFlow functions. These generated tensors can either be assigned to a constant or a variable, or provided to their constructor at the time of initialization.

As an example, the following code generates a vector of 100 zeroes and prints it:

a=tf.zeros((100,))
print(tfs.run(a))

TensorFlow provides different types of functions to populate the tensors at the time of their definition:

  • Populating all elements with the same values
  • Populating elements with sequences
  • Populating elements with a random probability distribution, such as the normal distribution or the uniform distribution
主站蜘蛛池模板: 芜湖市| 霍山县| 健康| 崇文区| 永康市| 长春市| 察哈| 南木林县| 新密市| 武川县| 通化市| 卫辉市| 乌兰浩特市| 文水县| 海门市| 安达市| 汾西县| 南木林县| 德昌县| 株洲县| 民权县| 临清市| 永定县| 临夏县| 衡水市| 新乡县| 玛多县| 双鸭山市| 溧水县| 蓬莱市| 城步| 临夏市| 桦甸市| 滕州市| 老河口市| 海南省| 腾冲县| 临漳县| 渝北区| 同江市| 大厂|