# Triton ensemble model output wrong values when retrieving result from buffer through python bindings

**URL:** <https://forums.developer.nvidia.com/t/triton-ensemble-model-output-wrong-values-when-retrieving-result-from-buffer-through-python-bindings/244489>\
**Category:** DeepStream SDK\
**Tags:** inference-server-triton, python, tensorrt\
**Created:** [March 1, 2023, 7:38am UTC](https://forums.developer.nvidia.com/t/triton-ensemble-model-output-wrong-values-when-retrieving-result-from-buffer-through-python-bindings/244489 "2023-03-01T07:38:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casetiadharma](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@casetiadharma](https://forums.developer.nvidia.com/u/casetiadharma)\
**Post date:** [March 1, 2023, 7:38am UTC](https://forums.developer.nvidia.com/t/triton-ensemble-model-output-wrong-values-when-retrieving-result-from-buffer-through-python-bindings/244489/1 "2023-03-01T07:38:00Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)** GPU  
**• DeepStream Version** 6.2  
**• JetPack Version (valid for Jetson only)**  
**• TensorRT Version** 8.5.2.2  
**• NVIDIA GPU Driver Version (valid for GPU only)** 525.85.12  
**• Issue Type( questions, new requirements, bugs)** bug  
**• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)**

I have a custom ensemble model on triton. I am trying to write a custom parser like in the deepstream\_ssd\_parser example. my ensemble model outputs two layers : [-1, 7] and [-1] where -1 is the number of objects detected depending on the count in the postprocess. it is usually around [30, 7]

When running deepstream with triton inference server, i can confirm that triton is returning the correct values by printing the output through my triton python model script.

However, when i try to get the same output through the output tensor meta in deepstream through the python bindings function pyds.get\_detection(), i am getting very high/low values that does not match my trition model output. The wrong values are similar to the numbers here

[Wrong values in model output using gRPC](https://forums.developer.nvidia.com/t/wrong-values-in-model-output-using-grpc/220743) Here it was mentioned that it is a bug to be fixed in the next release.

**• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)**

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [March 2, 2023, 3:29am UTC](https://forums.developer.nvidia.com/t/triton-ensemble-model-output-wrong-values-when-retrieving-result-from-buffer-through-python-bindings/244489/3 "2023-03-02T03:29:13Z")

</div>

What is the data type of the two output layers of your model?

---

<div class="post-metadata">

**Author:** ![casetiadharma](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@casetiadharma](https://forums.developer.nvidia.com/u/casetiadharma)\
**Post date:** [March 2, 2023, 3:37am UTC](https://forums.developer.nvidia.com/t/triton-ensemble-model-output-wrong-values-when-retrieving-result-from-buffer-through-python-bindings/244489/4 "2023-03-02T03:37:29Z")

</div>

Hi Fiona, thanks for getting back

One layer is FP16, the other is UINT16. I could get the correct UINT16 value from deepstream (verified to match with the triton output), however the FP16 layer is giving erronous values.

---

<div class="post-metadata">

**Author:** ![casetiadharma](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@casetiadharma](https://forums.developer.nvidia.com/u/casetiadharma)\
**Post date:** [March 2, 2023, 6:12am UTC](https://forums.developer.nvidia.com/t/triton-ensemble-model-output-wrong-values-when-retrieving-result-from-buffer-through-python-bindings/244489/5 "2023-03-02T06:12:44Z")

</div>

I solved the problem by changing the output layer data type to FP32 instead of FP16. Thanks for pointing to that direction.

It is unexpected because in my custom triton ensemble postprocessing, I was working with numpy and ensured it was in FP16 by doing np.astype() right before I send it as inference output.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [March 16, 2023, 6:13am UTC](https://forums.developer.nvidia.com/t/triton-ensemble-model-output-wrong-values-when-retrieving-result-from-buffer-through-python-bindings/244489/6 "2023-03-16T06:13:26Z")

</div>

Closed on March 16, 2023, 6:13am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
