- 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
推薦閱讀
- Learning SQL Server Reporting Services 2012
- 嵌入式技術基礎與實踐(第5版)
- 電腦常見故障現場處理
- scikit-learn:Machine Learning Simplified
- OUYA Game Development by Example
- Machine Learning with Go Quick Start Guide
- 微型計算機系統原理及應用:國產龍芯處理器的軟件和硬件集成(基礎篇)
- LPC1100系列處理器原理及應用
- 單片機原理及應用:基于C51+Proteus仿真
- WebGL Hotshot
- Hands-On Deep Learning for Images with TensorFlow
- 觸摸屏應用技術從入門到精通
- 可編程邏輯器件項目開發設計
- PIC系列單片機的流碼編程
- 嵌入式系統原理:基于Arm Cortex-M微控制器體系