serving icon indicating copy to clipboard operation
serving copied to clipboard

Docs for batching parameter `pad_variable_length_inputs`

Open jeongukjae opened this issue 2 years ago • 5 comments

When I use TF-Serving with batching options and variable length inputs, I could get errors like Tensors with name 'example_feature:0' from different tasks have different shapes and padding is turned off.Set pad_variable_length_inputs to true, or ensure that all tensors with the same namehave equal dimensions starting with the first dim., and I could find codes related to that parameters.

  • https://github.com/tensorflow/serving/blob/2b20315418346837a26a11f640fed0da90048a08/tensorflow_serving/servables/tensorflow/session_bundle_config.proto#L165
  • https://github.com/tensorflow/serving/blob/21360c763767823b82768ce42c5c90c0c9012601/tensorflow_serving/batching/batching_session.cc#L514

But in batching guide(https://github.com/tensorflow/serving/blob/master/tensorflow_serving/batching/README.md), there is no description about parameter pad_variable_length_inputs.

Can you add descriptions for pad_variable_length_inputs in the batching guide?

jeongukjae avatar Nov 03 '21 07:11 jeongukjae

+1

denadai2 avatar Apr 14 '22 08:04 denadai2

+1

YoungXu06 avatar Jul 26 '22 14:07 YoungXu06

@jeongukjae,

Descriptions on pad_variable_length_inputs batching parameter can be found in tensorflow_serving/batching/batching_options.h file.

Thank you!

singhniraj08 avatar Feb 03 '23 07:02 singhniraj08

@singhniraj08 Thank you for your help :) I was able to find the related code and understand it, but I think it would be even more helpful if this argument was added to the "TensorFlow Serving Batching Guide" documentation.

jeongukjae avatar Feb 03 '23 12:02 jeongukjae

@christisg,

Can we add pad_variable_length_inputs parameter description in TensorFlow Serving Batching Guide. I can create a PR to update the doc.

Thank you!

singhniraj08 avatar Feb 07 '23 04:02 singhniraj08