question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failed to load Tensor shape expected by framework [] doesn't match model configuration shape [-1]

See original GitHub issue

I am trying to load the model which is text and doesn’t have specific input shape this is my config file:

name: "model"
platform: "tensorflow_savedmodel"
max_batch_size: 16
input [
  {
    name: "label_ids"
    data_type: TYPE_INT64
    dims: []
  },
  {
    name: "input_ids"
    data_type: TYPE_INT64
    dims: [128]
  },
  {
    name: "input_mask"
    data_type: TYPE_FP32
    format: FORMAT_NHWC
    dims: [128]
  },
  {
    name: "segment_ids"
    data_type: TYPE_FP32
    format: FORMAT_NHWC
    dims: [128]
  }
]
output [
  {
    name: "output"
    data_type: TYPE_FP32
    dims: [ 1300 ]
  }
]
instance_group [
  {
    count: 1
    gpus: [0]
  }
]
dynamic_batching {
      preferred_batch_size: [ 16 ]
      max_queue_delay_microseconds: 100
    }

I know that labels_id doesn’t have specific shape, but when I give empty list I get this error:

E1003 18:35:18.944193 1 server.cc:137] model input must specify ‘dims’ for model

And when I try with [-1] I get this error:

failed to load ‘mode’ version 1: Invalid argument: unable to load model ‘model’, tensor ‘label_ids’ shape expected by framework [] doesn’t match model configuration shape [-1]

Any help?

My command: **sudo nvidia-docker run --rm --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -p8000:8000 -p8001:8001 -p8002:8002 -v/home/serving/teste/models_trt:/models nvcr.io/nvidia/tensorrtserver:19.06-py3 trtserver --model-store=/models --strict-model-config=false**

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
deadeyegoodwincommented, Apr 28, 2020

@yoonjaecho This is an old closed issue. Can you file a new issue with your question and delete your comment from this issue.

0reactions
gr8Adakroncommented, Oct 9, 2019

@deadeyegoodwin thanks! reshaping worked.


 {
    name: "label_ids"
    data_type: TYPE_INT64
    dims: [1]
    reshape: { shape: [] }
  }

Closing it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed to load Tensor shape expected by framework [] doesn't ...
I am trying to load the model which is text and doesn't have specific input shape this is my config file: name: "model"...
Read more >
Expected dense_Dense1_input to have shape "a" but got ...
The error indicates that there is a mismatch between the shape defined for the model and the tensors used by the model be...
Read more >
tf.keras.layers.Layer | TensorFlow v2.11.0
A layer is a callable object that takes as input one or more tensors and that outputs one ... and creates layer weights...
Read more >
Troubleshoot Neo Compilation Errors - Amazon SageMaker
Check that the input of your compilation job satisfies the input requirements. See What input data shapes does SageMaker Neo expect? Check common...
Read more >
Accelerating Inference in TensorFlow with TensorRT User Guide
If only a small number of concrete input shapes are expected, then it is recommended to use the “Optimal” strategy. If build() is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found