简体   繁体   English

tf.estimator.Estimator 不记录任何事件文件,张量板什么也不显示

[英]tf.estimator.Estimator not logging any event files, tensorboard showing nothing

I'm currently running TensorFlow 1.9.0 .我目前正在运行TensorFlow 1.9.0 My custom estimator is created with tf.estimator.Estimator , and run without a glitch.我的自定义估算器是使用tf.estimator.Estimator创建的,并且可以正常运行。 However, I don't find any event files under model_dir , and TensorBoard simply shows nothing.但是,我在model_dir下没有找到任何事件文件,并且 TensorBoard 没有显示任何内容。

Here's how I setup my estimator:这是我设置估算器的方法:

classifier= tf.estimator.Estimator(
    model_fn=lr_model_fn, model_dir=PATH)

and I open TensorBoard via tensorboard --logdir=tf_models/ --host=127.0.0.1 where tf_models is the dir PATH .我通过tensorboard --logdir=tf_models/ --host=127.0.0.1打开 TensorBoard,其中tf_models是目录PATH

Files logged in model_dir include checkpoint , graph.pbtxt , model.ckpt-* , etc. No events.out.tfevents* files reside there.记录在model_dir文件包括checkpointgraph.pbtxtmodel.ckpt-*等。没有events.out.tfevents*文件驻留在那里。 Is this normal?这是正常的吗? Did I have something misconfigured?我有什么配置错误吗?

It may happen when you delete the previously defined model_dir in your Estimator configuration: FileWriter will fail to write in the deleted directory (even a directory with the same path is created).当您在Estimator配置中删除之前定义的model_dir时可能会发生: FileWriter将无法写入已删除的目录(即使创建了具有相同路径的目录)。

You can use tf.summary.FileWriterCache.clear() to clear current cache if this happens.如果发生这种情况,您可以使用tf.summary.FileWriterCache.clear()清除当前缓存。 You will lose anterior cached summaries though.但是,您将丢失先前缓存的摘要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM