Update 快手用户活跃预测-checkpoint.ipynb

pull/2/head
benjas 5 years ago
parent e9b6ec32bd
commit fb77d8fa5c

@ -49225,6 +49225,8 @@
}
],
"source": [
"# tf.get_variable创建新的tensorflow变量\n",
"# tf.placeholder在神经网络构建graph的时候在模型中的占位此时没有把数据传入模型只会分配必要的内存。运行模型的时候通过feed_dict()函数向占位符喂入数据。\n",
"n_features = 12\n",
"n_hu = 8\n",
"with tf.variable_scope('train'): # tf.variable_scope用来指定变量的作用域\n",
@ -49233,7 +49235,7 @@
" lr = tf.placeholder(tf.float32, [], name='learning_rate') # 定义学习率\n",
" \n",
" # 隐藏层到输出层的参数W, bn_hu隐藏单元的个数\n",
" W_out = tf.get_variable('W_out', [n_hu, 1]) \n",
" W_out = tf.get_variable('W_out', [n_hu, 1])\n",
" b_out = tf.get_variable('b_out', [1])\n",
" \n",
" # x(batch_size, seq_length, n_features)\n",

Loading…
Cancel
Save