I am trying to export my own implemented YOLOv3 from PyTorch to ONNX (To be used in Caffe2+TensorRT). The outputs of the network are like this:
y1 = self.yolo_82(x)
...
y2 = self.yolo_94(x)
...
y3 = self.yolo_106(x)
return torch.cat( (y1,y2,y3), 1 )

The issue is, the ONNX exporter is exporting this last layer as:
{
  %439 : Float(1, 10647, 85) = onnx::Constant[value=<Tensor>]()
  return (%439);
}


As a result when I run the model in Caffe2, it gives me the same output as on the image I used to export the network.
My questions are:


PyTorch Docs 3 claim that torch.cat is supported in ONNX export, if yes then why is the ONNX export returning a constant array instead of concatenated tensors?
Is there some special/secret ingredient that I am missing here.

Any/all help is appreciated as I am stuck here for quite long.