Pytorch model send raw binary data for multiple inputs

Hi, I have a Pytorch model hosted in the server.
I’ve followed the naming convention for the inputs and outputs (multiple for each) but what I’m struggling on is how to convert the tensors to raw binary data to send across as a request to the server (using requests library).
I’ve implemented another model which I’ve converted to ONNX successfully and just converting the numpy arrays to bytes, but what’s the approach for a Pytorch model’s input tensor data?



Please refer below link for supported data format in TRT: