Yeah, I had another go at it yesterday and I figured out how to correctly define a placeholder. You will still have to add your own runtime implementation for onnx. Since I’m using TensorRT I made an implementation for that (although I hasn’t been validated yet, I only just started working on it again).

  
    
    
    ONNX Export Placeholder for unsupported PyTorch ops? 
  
  
    I’m trying to use ONNX as an intermediate bewteeen Pytorch and TensorRT. When exporting, onnx complains about grid_sample not being supported. Is there a way to get it to throw in a placeholder node with the same args etc for a PyTorch op? 
I have previously added ONNX support for a correlation function which somewhat exports correctly. ONNX complains about exporting the autograd function, but I am able to just comment out the autograd call and use the custom op directly just when exporting for …