610265158/face_landmark

Two questions about the codes.

XP-CHRC opened this issue · 1 comments

1.net_work.py
line 221: summaries = tf.get_collection('%smutiloss' % scope, scope)
line 239: summaries.append(tf.summary.histogram(var.op.name + '/gradients', grad))
line 246: summaries.append(tf.summary.histogram(var.op.name, var))

u just made a summaries list, but didn't use it later. Also, what's the meaning of:'%smutiloss' % scope, does there have var named '%smutiloss' % scope?(I guess you originally wanted to use:for var in summaries: do tf.summary.histogram() && self.summaries.append()??)

2.net_work.py
line 254: train_op = tf.group(apply_gradient_op, variables_averages_op, *bn_update_ops)

What is the specific execution order? because in my mind, the bn_update_ops should executed before apply_gradient_op(for example: use the with tf.control_dependencies...), i don't know the specific mechanism.

Thanks!

Hi,
here is the answer for your question:

  1. I am not familiar with summaries, so it not used. You just could ignore these codes.
  2. I think it does not matter for the bn update. The mean and var is calculated by moving average, it is not so sensitive.
    And the mean and var are calculate when inference, so i think the mean and var are calculate before the apply_gradient_op.

Thanks