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












0















I am running tensorflow server from bash:
Command used:



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


I am getting the following error:



<path to .pb file>/saved_model.pb:
line 1: $'b012234430737616': command not found <path to .pb file>/saved_model.pb:
line 2: $'203202234517': command not found <path to .pb file>/saved_model.pb:
line 4: $'03Add2206': command not found <path to .pb file>/saved_model.pb:
line 6: $'01x01T2206n01y01T3206': command not found <path to .pb file>/saved_model.pb:
line 7: $'01z01TE': command not found <path to .pb file>/saved_model.pb:
line 8: $'01T2204type:20': command not found <path to .pb file>/saved_model.pb:
line 9: $'162f1623010204060503': 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: $'04Cast22': command not found <path to .pb file>/saved_model.pb:
line 14: $'01x04SrcT32tn01y04DstTfn04SrcT2204typef': command not found <path to .pb file>/saved_model.pb:
line 15: $'04DstT2204type': 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: $'05Const3217': command not found <path to .pb file>/saved_model.pb:
line 18: $'06output05dtype17': command not found <path to .pb file>/saved_model.pb:
line 24: $'05value2206tensorrn05dtype2204typen35401n06Conv2D22nn05input01T22v': command not found <path to .pb file>/saved_model.pb:
line 28: $'06filter01T32vn06output01T23n01T2204type:bn062042316010224': 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)"�'


I am not sure how to fix the issue.
I am using anaconda in my system.
Any lead would be really helpful.



Thanks in advance










share|improve this question





























    0















    I am running tensorflow server from bash:
    Command used:



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


    I am getting the following error:



    <path to .pb file>/saved_model.pb:
    line 1: $'b012234430737616': command not found <path to .pb file>/saved_model.pb:
    line 2: $'203202234517': command not found <path to .pb file>/saved_model.pb:
    line 4: $'03Add2206': command not found <path to .pb file>/saved_model.pb:
    line 6: $'01x01T2206n01y01T3206': command not found <path to .pb file>/saved_model.pb:
    line 7: $'01z01TE': command not found <path to .pb file>/saved_model.pb:
    line 8: $'01T2204type:20': command not found <path to .pb file>/saved_model.pb:
    line 9: $'162f1623010204060503': 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: $'04Cast22': command not found <path to .pb file>/saved_model.pb:
    line 14: $'01x04SrcT32tn01y04DstTfn04SrcT2204typef': command not found <path to .pb file>/saved_model.pb:
    line 15: $'04DstT2204type': 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: $'05Const3217': command not found <path to .pb file>/saved_model.pb:
    line 18: $'06output05dtype17': command not found <path to .pb file>/saved_model.pb:
    line 24: $'05value2206tensorrn05dtype2204typen35401n06Conv2D22nn05input01T22v': command not found <path to .pb file>/saved_model.pb:
    line 28: $'06filter01T32vn06output01T23n01T2204type:bn062042316010224': 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)"�'


    I am not sure how to fix the issue.
    I am using anaconda in my system.
    Any lead would be really helpful.



    Thanks in advance










    share|improve this question



























      0












      0








      0








      I am running tensorflow server from bash:
      Command used:



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


      I am getting the following error:



      <path to .pb file>/saved_model.pb:
      line 1: $'b012234430737616': command not found <path to .pb file>/saved_model.pb:
      line 2: $'203202234517': command not found <path to .pb file>/saved_model.pb:
      line 4: $'03Add2206': command not found <path to .pb file>/saved_model.pb:
      line 6: $'01x01T2206n01y01T3206': command not found <path to .pb file>/saved_model.pb:
      line 7: $'01z01TE': command not found <path to .pb file>/saved_model.pb:
      line 8: $'01T2204type:20': command not found <path to .pb file>/saved_model.pb:
      line 9: $'162f1623010204060503': 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: $'04Cast22': command not found <path to .pb file>/saved_model.pb:
      line 14: $'01x04SrcT32tn01y04DstTfn04SrcT2204typef': command not found <path to .pb file>/saved_model.pb:
      line 15: $'04DstT2204type': 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: $'05Const3217': command not found <path to .pb file>/saved_model.pb:
      line 18: $'06output05dtype17': command not found <path to .pb file>/saved_model.pb:
      line 24: $'05value2206tensorrn05dtype2204typen35401n06Conv2D22nn05input01T22v': command not found <path to .pb file>/saved_model.pb:
      line 28: $'06filter01T32vn06output01T23n01T2204type:bn062042316010224': 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)"�'


      I am not sure how to fix the issue.
      I am using anaconda in my system.
      Any lead would be really helpful.



      Thanks in advance










      share|improve this question
















      I am running tensorflow server from bash:
      Command used:



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


      I am getting the following error:



      <path to .pb file>/saved_model.pb:
      line 1: $'b012234430737616': command not found <path to .pb file>/saved_model.pb:
      line 2: $'203202234517': command not found <path to .pb file>/saved_model.pb:
      line 4: $'03Add2206': command not found <path to .pb file>/saved_model.pb:
      line 6: $'01x01T2206n01y01T3206': command not found <path to .pb file>/saved_model.pb:
      line 7: $'01z01TE': command not found <path to .pb file>/saved_model.pb:
      line 8: $'01T2204type:20': command not found <path to .pb file>/saved_model.pb:
      line 9: $'162f1623010204060503': 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: $'04Cast22': command not found <path to .pb file>/saved_model.pb:
      line 14: $'01x04SrcT32tn01y04DstTfn04SrcT2204typef': command not found <path to .pb file>/saved_model.pb:
      line 15: $'04DstT2204type': 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: $'05Const3217': command not found <path to .pb file>/saved_model.pb:
      line 18: $'06output05dtype17': command not found <path to .pb file>/saved_model.pb:
      line 24: $'05value2206tensorrn05dtype2204typen35401n06Conv2D22nn05input01T22v': command not found <path to .pb file>/saved_model.pb:
      line 28: $'06filter01T32vn06output01T23n01T2204type:bn062042316010224': 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)"�'


      I am not sure how to fix the issue.
      I am using anaconda in my system.
      Any lead would be really helpful.



      Thanks in advance







      python bash tensorflow protocol-buffers tensorflow-serving






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 23 '18 at 13:10









      Bsquare

      3,63851434




      3,63851434










      asked Nov 23 '18 at 8:58









      SummaSumma

      185




      185
























          1 Answer
          1






          active

          oldest

          votes


















          1














          model_base_path should be a directory, the parent folder of the version folder of saved_model.pb and variables, not a file. For example, for the following directory, model_base_path should be path_to_versionsversions.



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





          share|improve this answer
























          • Thanks @Yiding. I made change accordingly and 'model_base_path' is now pointing to the directory containing the .pb file and the variables folder. However, this attempt also threw error. command used (/serve/1 folder contains .pb file): tensorflow_model_server --rest_api_port=8501 --model_name=saved_model --model_base_path=$(<path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/) Please find below the new error: bash: <path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/: Is a directory Illegal instruction

            – Summa
            Nov 24 '18 at 4:23











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53443415%2frunning-tensorflow-model-server-from-bash-is-throwing-command-not-found-error%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          model_base_path should be a directory, the parent folder of the version folder of saved_model.pb and variables, not a file. For example, for the following directory, model_base_path should be path_to_versionsversions.



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





          share|improve this answer
























          • Thanks @Yiding. I made change accordingly and 'model_base_path' is now pointing to the directory containing the .pb file and the variables folder. However, this attempt also threw error. command used (/serve/1 folder contains .pb file): tensorflow_model_server --rest_api_port=8501 --model_name=saved_model --model_base_path=$(<path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/) Please find below the new error: bash: <path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/: Is a directory Illegal instruction

            – Summa
            Nov 24 '18 at 4:23
















          1














          model_base_path should be a directory, the parent folder of the version folder of saved_model.pb and variables, not a file. For example, for the following directory, model_base_path should be path_to_versionsversions.



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





          share|improve this answer
























          • Thanks @Yiding. I made change accordingly and 'model_base_path' is now pointing to the directory containing the .pb file and the variables folder. However, this attempt also threw error. command used (/serve/1 folder contains .pb file): tensorflow_model_server --rest_api_port=8501 --model_name=saved_model --model_base_path=$(<path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/) Please find below the new error: bash: <path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/: Is a directory Illegal instruction

            – Summa
            Nov 24 '18 at 4:23














          1












          1








          1







          model_base_path should be a directory, the parent folder of the version folder of saved_model.pb and variables, not a file. For example, for the following directory, model_base_path should be path_to_versionsversions.



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





          share|improve this answer













          model_base_path should be a directory, the parent folder of the version folder of saved_model.pb and variables, not a file. For example, for the following directory, model_base_path should be path_to_versionsversions.



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






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 23 '18 at 13:35









          YidingYiding

          866




          866













          • Thanks @Yiding. I made change accordingly and 'model_base_path' is now pointing to the directory containing the .pb file and the variables folder. However, this attempt also threw error. command used (/serve/1 folder contains .pb file): tensorflow_model_server --rest_api_port=8501 --model_name=saved_model --model_base_path=$(<path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/) Please find below the new error: bash: <path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/: Is a directory Illegal instruction

            – Summa
            Nov 24 '18 at 4:23



















          • Thanks @Yiding. I made change accordingly and 'model_base_path' is now pointing to the directory containing the .pb file and the variables folder. However, this attempt also threw error. command used (/serve/1 folder contains .pb file): tensorflow_model_server --rest_api_port=8501 --model_name=saved_model --model_base_path=$(<path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/) Please find below the new error: bash: <path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/: Is a directory Illegal instruction

            – Summa
            Nov 24 '18 at 4:23

















          Thanks @Yiding. I made change accordingly and 'model_base_path' is now pointing to the directory containing the .pb file and the variables folder. However, this attempt also threw error. command used (/serve/1 folder contains .pb file): tensorflow_model_server --rest_api_port=8501 --model_name=saved_model --model_base_path=$(<path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/) Please find below the new error: bash: <path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/: Is a directory Illegal instruction

          – Summa
          Nov 24 '18 at 4:23





          Thanks @Yiding. I made change accordingly and 'model_base_path' is now pointing to the directory containing the .pb file and the variables folder. However, this attempt also threw error. command used (/serve/1 folder contains .pb file): tensorflow_model_server --rest_api_port=8501 --model_name=saved_model --model_base_path=$(<path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/) Please find below the new error: bash: <path to folder containing .pb file and variables folder>/CycleGAN-TensorFlow_v2/serve/1/: Is a directory Illegal instruction

          – Summa
          Nov 24 '18 at 4:23


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53443415%2frunning-tensorflow-model-server-from-bash-is-throwing-command-not-found-error%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          TypeError: fit_transform() missing 1 required positional argument: 'X'