我正在尝试使用 TF2.0 (Beta) 来可视化 tf.data.Datasets 的性能。我找到了有关如何在旧版 tensorflow 中使用分析器的示例。
如何在 TF2.0 中进行分析?我可以使用 tf.compat.v1,但过程似乎并不简单。
我想测量内存消耗(设备放置明智)和时间线。
下面的示例解释了使用 TF1.x 进行分析
Can I measure the execution time of individual operations with TensorFlow?
Understanding tensorflow profiling results
最佳答案
同时,我找到了我的问题的解决方案:
使用我的训练步骤周围的 trace_on 和 trace_export 来获取分析器输出,如 here 所述
关于TF2.0 中的 Tensorflow 分析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56756028/