TensorFlow调试器V2未显示任何数据

发布于 2025-02-10 05:59:47 字数 1336 浏览 0 评论 0原文

我正在尝试使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文