运行 来自 bash 的 tensorflow_model_server 正在投掷 'command not found error'

Running tensorflow_model_server from bash is throwing 'command not found error'

我是 运行 来自 bash 的 tensorflow 服务器: 使用的命令:

tensorflow_model_server --rest_api_port=8501 --model_name=saved_model --model_base_path=$(<path to .pb file in my system>/saved_model.pb)

我收到以下错误:

<path to .pb file>/saved_model.pb:
 line 1: $'\b[=15=]124766': command not found <path to .pb file>/saved_model.pb:
 line 2: $'30257': command not found <path to .pb file>/saved_model.pb:
 line 4: $'[=15=]3Add2[=15=]6': command not found <path to .pb file>/saved_model.pb:
 line 6: $'[=15=]1x[=15=]1T2[=15=]6\n[=15=]1y[=15=]1T2[=15=]6': command not found <path to .pb file>/saved_model.pb:
 line 7: $'[=15=]1z[=15=]1T\E': command not found <path to .pb file>/saved_model.pb:
 line 8: $'[=15=]1T2[=15=]4type:0': command not found <path to .pb file>/saved_model.pb:
 line 9: $'62\f63[=15=]1[=15=]2[=15=]4[=15=]6[=15=]5[=15=]3': command not found <path to .pb file>/saved_model.pb:
 line 10: 8: command not found <path to .pb file>/saved_model.pb:
 line 11: $'[=15=]4Cast2': command not found <path to .pb file>/saved_model.pb:
 line 14: $'[=15=]1x[=15=]4SrcT2\t\n[=15=]1y[=15=]4DstT\f\n[=15=]4SrcT2[=15=]4type\f': command not found <path to .pb file>/saved_model.pb:
 line 15: $'[=15=]4DstT2[=15=]4type': command not found <path to .pb file>/saved_model.pb:
 line 16: 8: command not found <path to .pb file>/saved_model.pb:
 line 17: $'[=15=]5Const27': command not found <path to .pb file>/saved_model.pb:
 line 18: $'[=15=]6output[=15=]5dtype7': command not found <path to .pb file>/saved_model.pb:
 line 24: $'[=15=]5value2[=15=]6tensor\r\n[=15=]5dtype2[=15=]4type\n4[=15=]1\n[=15=]6Conv2D2\n\n[=15=]5input[=15=]1T2\v': command not found <path to .pb file>/saved_model.pb:
 line 28: $'[=15=]6filter[=15=]1T2\v\n[=15=]6output[=15=]1T3\n[=15=]1T2[=15=]4type:\b\n[=15=]62[=15=]436[=15=]1[=15=]24': command not found <path to .pb file>/saved_model.pb:
 line 29: syntax error near unexpected token (' <path to .pb file>/saved_model.pb:
 line 29: strides�  list(int)"�'

我不确定如何解决这个问题。 我在我的系统中使用 anaconda。 任何线索都会很有帮助。

提前致谢

model_base_path应该是目录,saved_model.pbvariables\的版本文件夹的父文件夹,不是文件。例如,对于以下目录,model_base_path 应该是 path_to_versions\versions.

`-- versions
    `-- 1
        |-- saved_model.pbtxt
        `-- variables
            |-- variables.data-00000-of-00001
            `-- variables.index