gpt4 book ai didi

python - 安装 tfprof 命令行

转载 作者:太空宇宙 更新时间:2023-11-03 14:12:19 27 4
gpt4 key购买 nike

我想使用 tfprof 分析我的 tensorflow 应用程序。我正在运行 TensorFlow 1.3 安装,其中缺少 tfprof 命令行工具。我也在本地尝试了提供的 pip 包,但在那里我也找不到 tfprof。

有没有办法在我正在运行的 tensorflow 应用程序上编译和链接 tfprof 命令行工具?

我已经 git 克隆了 tensorflow 存储库并尝试使用 bazel 0.5.2 构建它

$ bazel build --config opt tensorflow/core/profiler/...
WARNING: Output base '/home/USERNAME/.cache/bazel/_bazel_USERNAME/e5cce820cc082410b4fcc604db349066' is on NFS. This may lead to surprising failures and undetermined behavior.
WARNING: Config values are not defined in any .rc file: opt
ERROR: /tmp/tensorflow/tensorflow/core/BUILD:1416:1: no such target '//tensorflow/tools/git:gen/spec.json': target 'gen/spec.json' not declared in package 'tensorflow/tools/git' defined by /tmp/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /tmp/tensorflow/tensorflow/core/BUILD:1416:1: no such target '//tensorflow/tools/git:gen/head': target 'gen/head' not declared in package 'tensorflow/tools/git' defined by /tmp/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /tmp/tensorflow/tensorflow/core/BUILD:1416:1: no such target '//tensorflow/tools/git:gen/branch_ref': target 'gen/branch_ref' not declared in package 'tensorflow/tools/git' defined by /tmp/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: Analysis of target '//tensorflow/core/profiler:profiler' failed; build aborted.
INFO: Elapsed time: 167.083s

或者只是复制提到的命令 here

bazel build --config opt third_party/tensorflow/core/profiler/...                                                        
WARNING: Output base '/home/USERNAME/.cache/bazel/_bazel_USERNAME/e5cce820cc082410b4fcc604db349066' is on NFS. This may lead to surprising failures and undetermined behavior.
WARNING: Config values are not defined in any .rc file: opt
ERROR: no targets found beneath 'third_party/tensorflow/core/profiler'.

最佳答案

我觉得这条路不对。如果您的当前目录是克隆的tensorflow存储库,您应该使用路径tensorflow/core/profiler/

关于python - 安装 tfprof 命令行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48412868/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com