- Singe Dimentional Result Arrays
- Multi Dimentional Result Arrays
Handling variable output array
This will help you understand how to handle multiple varrible outputs in Client side
Often time you will want to get 1 or more outputs from your model. Inferless allows you to get multiple outputs from your model. In this guide, we’ll walk you through the steps to handle multiple outputs in Inferless.
There are 2 scenations for handling multiple outputs:
in the API response you will get the results as a list of values for example with shape 2
Limitations:
You can only return a single list of type (String/Int/Float/Boolean) in the API response.
If you have multiple outputs of for each input you can return a all the different outputs as seperate list.
Example :
in the API response you will get the results as a list of values for example with shape 2
If you make a API call with 2 sentences you will get the output where data will be of shape [1536] and the shape wil be [2,768]
In the clinet you will need to reshape the output to get the original shape.