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

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.

主站蜘蛛池模板: 高台县| 资中县| 治多县| 九龙县| 永胜县| 海盐县| 乌鲁木齐市| 边坝县| 金门县| 陵川县| 南京市| 贡嘎县| 太原市| 红安县| 门源| 东明县| 绥阳县| 东辽县| 泰安市| 英德市| 古交市| 大丰市| 封丘县| 陆丰市| 黄石市| 阿荣旗| 上林县| 江北区| 定结县| 萨迦县| 个旧市| 广汉市| 淅川县| 辽源市| 微博| 伊宁市| 绥德县| 惠来县| 建瓯市| 孟村| 抚顺县|