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

  • Mastering TensorFlow 1.x
  • Armando Fandango
  • 97字
  • 2021-06-25 22:50:55

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
主站蜘蛛池模板: 灵武市| 临颍县| 油尖旺区| 响水县| 巴东县| 永春县| 金塔县| 凯里市| 南涧| 阿尔山市| 紫阳县| 明光市| 游戏| 泰宁县| 东阿县| 林州市| 辉县市| 呼和浩特市| 措勤县| 沙坪坝区| 和政县| 杭锦后旗| 宣化县| 徐水县| 长岛县| 库尔勒市| 昌黎县| 阳山县| 库伦旗| 志丹县| 喀什市| 务川| 永安市| 孝昌县| 博客| 天门市| 安庆市| 蒙阴县| 东安县| 云梦县| 竹溪县|