TensorFlow调试器V2未显示任何数据
我正在尝试使用TensorFlow调试器V2调试一件代码,并使用以下说明进行调试:
from network_definitions import *
import tensorflow as tf
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "10"
os.environ["TF_DUMP_GRAPH_PREFIX"] = 'tbdump'
#os.environ["XLA_FLAGS"] = "--xla_dump_to=/tbdump/generated"
tf.debugging.set_log_device_placement(False)
tf.config.set_soft_device_placement(True)
tf.debugging.experimental.enable_dump_debug_info(
'./tbdump',
tensor_debug_mode="FULL_HEALTH",
circular_buffer_size=-1)
if __name__ == "__main__":
big_dataset = 'gtzan'
small_dataset = 'traintest_smallsmc'
dataset = big_dataset
# data_aug='NODAUG'# to run without data augmentation
finetune_db(dataset, data_aug='DAUG', load_pkl=True)
但是我遇到了以下问题:
- 启动
tensorboard -logdir /tbdump < /code> < /code>并在LocalHost上访问Tensorboar ,我总是会收到消息“调试器v2是不活动的,因为没有数据可用”。
- 有时,该程序的执行停止,并且永远不会从“ Epoch 1/50”中传递。
我可以看到,在 tbdump 文件夹中创建以下类型的文件:
- tfdbg_events.xxx ... xxx.graphs
- tfdbg_events.xxx ... xxx.xxx.source_files
- tfdbg_events tfdbg_events.xxx ... xxx。执行
- tfdbg_events.xxx ... xxx.stack_frames
- tfdbg_events.xxx ... xxx.graph_execution_traces
- tfdbg_events.xxx ... xxx.metadata
有什么想法关于如何完成此工作?
I'm trying to debug a piece of code with tensorflow debugger v2, with the following instructions:
from network_definitions import *
import tensorflow as tf
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "10"
os.environ["TF_DUMP_GRAPH_PREFIX"] = 'tbdump'
#os.environ["XLA_FLAGS"] = "--xla_dump_to=/tbdump/generated"
tf.debugging.set_log_device_placement(False)
tf.config.set_soft_device_placement(True)
tf.debugging.experimental.enable_dump_debug_info(
'./tbdump',
tensor_debug_mode="FULL_HEALTH",
circular_buffer_size=-1)
if __name__ == "__main__":
big_dataset = 'gtzan'
small_dataset = 'traintest_smallsmc'
dataset = big_dataset
# data_aug='NODAUG'# to run without data augmentation
finetune_db(dataset, data_aug='DAUG', load_pkl=True)
but I'm running into the following issues:
- after starting
tensorboard --logdir /tbdump
and accessing tensorboar on localhost, I always get the message "Debugger V2 is inactive because no data is available." - Sometimes, the execution of the program halts and never passes from "Epoch 1/50".
I can see that in tbdump folder there are being created the following type of files:
- tfdbg_events.xxx...xxx.graphs
- tfdbg_events.xxx...xxx.source_files
- tfdbg_events.xxx...xxx.execution
- tfdbg_events.xxx...xxx.stack_frames
- tfdbg_events.xxx...xxx.graph_execution_traces
- tfdbg_events.xxx...xxx.metadata
Any idea on how to make this work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论