
tensorflow
文章平均质量分 79
SATAN 先生
撒旦
展开
-
tensorflow 中的学习率衰减
在对一个模型进行训练时,通常建议随着训练的进行降低学习率,前期快速优化后期稳步收敛。设当前训练步数为 global_step,则学习率为:current_lr=decay_fun(learning_rate,global_step,θ)current\_lr = decay\_fun(learning\_rate, global\_step, \theta)current_lr=decay_fun(learning_rate,global_step,θ)衰减策略由函数 decay_fundecay\原创 2022-04-10 22:30:41 · 2190 阅读 · 0 评论 -
tensorflow 变量及命名空间 tf.Variable() vs tf.get_variable() & tf.name_scope() vs tf.variable_scope()
tf.Variable() vs tf.get_variable() tf.name_scope() vs tf.variable_scope()1. 基础功能1.1 tf.Variable()是一个类,tensorflow.python.ops.variables.Variable,其构造函数原型为def __init__( self, initial_value: Any = None, trainable: bool = True, collections:原创 2022-04-07 21:44:48 · 2568 阅读 · 0 评论 -
tensorflow 中 tf.control_dependencies 顺序问题
最近在学习 tensorflow MNIST 程序时遇到了 tf.control_dependencies(),具体为:......variables_averages_op = variable_averages.apply(tf.trainable_variables()) # apply --vars--> average_op......# 优化损失函数train_step = tf.train.GradientDescentOptimizer(learning_rate).min原创 2022-04-06 16:30:22 · 324 阅读 · 0 评论