请问mode=='evaluate'时,run_evaluate函数里计算的metric只是一个batch的metric?
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 553
- PR merge metrics
- No merged PRs in 30d
Description
请问mode=='evaluate'时,run_evaluate函数里计算的metric只是一个batch的metric 吗?
如下代码,
with tf.train.MonitoredTrainingSession(
master=master, is_chief=is_chief,
checkpoint_dir=flags_obj.model_dir,
save_checkpoint_secs=None,
log_step_count_steps=None,
hooks=hooks, config=config) as sess:
while not sess.should_stop():
metric_val = sess.run(metric)
print('{}: {}'.format(metric_name, metric_val))
里面没有加hook,所以source没有next时自动停止吗?
每一次batch,返回的metric都是一个具体值,这样最后metric_val 就是最后一个batch计算出的
metric,请问是这样的吗?
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the run_evaluate implementation and the MonitoredTrainingSession loop shown in the issue, then trace how metric and source are defined. Run the evaluate path and inspect whether metric_val represents one batch or an aggregate, and whether iteration stops when source has no next element; done means the behavior is documented or corrected with a focused test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100