【问题标题】:Unable to build the TensorFlow model using bazel build无法使用 bazel build 构建 TensorFlow 模型
【发布时间】:2017-03-06 17:01:30
【问题描述】:

按照https://tensorflow.github.io/serving/serving_basic 的说明,我已经在 Windows 机器上运行的 docker 机器中设置了 TensorFlow 服务器。我成功地构建并运行了 mnist_model。但是,当我尝试通过运行以下命令“bazel build //tensorflow_serving/example:wide_n_deep_tutorial.py”为 wide_n_deep_tutorial 示例构建模型时,模型没有成功构建,因为 bazel-bin 文件夹中没有生成文件。

由于在构建模型时没有显示错误消息,我无法找出问题所在。如果有人可以帮助我调试和解决问题,我将不胜感激。

【问题讨论】:

    标签: tensorflow bazel tensorflow-serving


    【解决方案1】:

    通过在 BUILD 文件中添加宽和深模型的目标可以解决问题。

    在 BUILD 文件中添加了以下内容:

    py_binary(
        name = "wide_n_deep_model",
        srcs = [
            "wide_n_deep_model.py",
        ],
        deps = [
            "//tensorflow_serving/apis:predict_proto_py_pb2",
            "//tensorflow_serving/apis:prediction_service_proto_py_pb2",
            "@org_tensorflow//tensorflow:tensorflow_py",
        ],
    )
    

    【讨论】:

      【解决方案2】:

      你只是猜测这里的命令行为there is no target in the BUILD file of tensorflow serving for wide_n_deep_tutorial.py

      从今天开始,您只能构建 mnist 和 inception 目标。

      【讨论】:

      • 所以我无法在 TensorFlow Serving 中构建和运行自己的模型?
      猜你喜欢
      • 2017-06-07
      • 1970-01-01
      • 1970-01-01
      • 2020-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多