Variables
Variables are the containers used to store values. Variables will be used as input to several other operations in the computational graph. We can create TensorFlow variables using the tf.Variable() function. In the following example, we define a variable with values from a random normal distribution and name it weights:
weights = tf.Variable(tf.random_normal([3, 2], stddev=0.1), name="weights")
However, after defining a variable, we need to explicitly create an initialization operation using the tf.global_variables_initializer() method which will allocate resources for the variable.
推薦閱讀
- SQL Server入門經典
- 從0到1:數據分析師養成寶典
- 數亦有道:Python數據科學指南
- Microsoft Power BI數據可視化與數據分析
- 深入淺出Greenplum分布式數據庫:原理、架構和代碼分析
- 新手學會計(2013-2014實戰升級版)
- 數據修復技術與典型實例實戰詳解(第2版)
- 中文版Access 2007實例與操作
- 數據庫技術與應用:SQL Server 2008
- Managing Software Requirements the Agile Way
- SQL應用開發參考手冊
- 達夢數據庫集群
- 數據質量管理:數據可靠性與數據質量問題解決之道
- UnrealScript Game Programming Cookbook
- Learning Game AI Programming with Lua