我正在使用tensorflow对象检测API。我希望损失值可以使用自己的数据集计算其他指标。我不知道如何从苗条中获取价值。我不想使用张量板。 这是在object_detection / trainer.py
下slim.learning.train(
train_tensor,
logdir=train_dir,
master=master,
is_chief=is_chief,
session_config=session_config,
startup_delay_steps=train_config.startup_delay_steps,
init_fn=init_fn,
summary_op=summary_op,
number_of_steps=(
train_config.num_steps if train_config.num_steps else None),
save_summaries_secs=120,
sync_optimizer=sync_optimizer,
saver=saver)
我试图像这样从tf.event获取值。
for e in tf.train.summary_iterator(path_to_events_file):
for v in e.summary.value:
if v.tag == 'loss' :
print(v.simple_value)
但是没有损失值标签。不确定object_detection API如何将值存储在tf.event中,并且tensorboard读取它。我是tensorflow的新手,因此不胜感激。提前非常感谢您。
我希望它存储此实时损失值
INFO:tensorflow:global step 1558: loss = 3.3541 (0.242 sec/step)
INFO:tensorflow:global step 1559: loss = 3.3310 (0.235 sec/step)
INFO:tensorflow:global step 1560: loss = 3.1000 (0.243 sec/step)
INFO:tensorflow:global step 1561: loss = 2.7938 (0.246 sec/step)
INFO:tensorflow:global step 1562: loss = 3.9739 (0.240 sec/step)
INFO:tensorflow:global step 1563: loss = 2.7298 (0.256 sec/step)
INFO:tensorflow:global step 1564: loss = 3.5494 (0.249 sec/step)
INFO:tensorflow:global step 1565: loss = 2.7987 (0.237 sec/step)
INFO:tensorflow:global step 1566: loss = 3.3477 (0.251 sec/step)