TF2.0 中的 Tensorflow 分析

标签 tensorflow tensorboard tensorflow2.0

我正在尝试使用 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 所述
Example Profile

关于TF2.0 中的 Tensorflow 分析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56756028/

相关文章:

python - 如何加载带有自定义损失的模型?

python - 使用tensorflow API对检测到的对象进行计数

machine-learning - 如何向 TensorFlow 中预训练的 Inception v3 模型添加新类别和训练?

python - Tensorflow 标量摘要为人类可读的文本

tensorflow - 在 Jupyter 中可视化 TensorFlow 图不起作用

python - 输出到终端的 Tensorflow 用等号填充

tensorflow - Keras CNN 模型中的训练和损失没有改变

machine-learning - 如何在 Keras 中实现 Perplexity?

python - 更新 Tensorboard,同时使用 conda 保持 Tensorflow 旧版

ffmpeg - tfds.features.Video 在 tensorflow 2 中用于视频解码的用法