tensorflow2.0 - 如何在 TensorFlow 2.n 中启用设备放置日志记录 (log_device_placement)
问题描述
我想看看哪些操作在哪个设备上运行。在 TensorFlow 1.n 中,可以使用会话配置 (log_device_placement)。TF 2.n 中是否有类似的操作?
解决方案
为了查找哪些操作在哪个设备上运行,请使用
tf.debugging.set_log_device_placement(True)
作为导入 TensorFlow 后的第一行。您可以在此处找到更多详细信息
推荐阅读
- swift - 在 didFinishLaunchingWithOptions 中访问 ViewController
- python - pyspark:在 pyspark 中创建新列时出错
- sql-server - SQL 实例对象资源管理器挂起
- c - 如何在文件和控制台中存储、写入、读取多字节字符(字符串)
- palantir-foundry - 如何为 CURRENT_TIMESTAMP 配置 Code Workbook 的时区?
- flutter - Flutter 将文本添加到 TextField 控制器中
- joomla - 安排 Joomla 网站离线
- django - 如何避免 Django 模板中的重复数据
- debugging - 使用 Telerek Just Decompile 重新创建 .NET 源项目L:无法正常调试
- python - Mongoengine:发生异常:ServerSelectionTimeoutError