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

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
主站蜘蛛池模板: 富平县| 婺源县| 米林县| 阳山县| 岐山县| 紫阳县| 格尔木市| 布尔津县| 麻阳| 灵寿县| 冀州市| 石柱| 东乡| 湖南省| 洪雅县| 菏泽市| 阜宁县| 大英县| 青田县| 曲麻莱县| 射洪县| 莲花县| 湘西| 东明县| 兰坪| 绍兴县| 江达县| 凤城市| 琼海市| 鄂托克旗| 岳池县| 象州县| 巍山| 顺义区| 奉化市| 兰考县| 马尔康县| 崇信县| 大港区| 仲巴县| 环江|