4

I want to convert Prototypical Networks for Few-shot Learning to onnx. Export onnx:

torch.onnx.export(model,(example_query_images, example_query_labels, x_pred), "super_resolution.onnx")

And it raise error 'RuntimeError: Exporting the operator cdist to ONNX opset version 9 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub.'

yakhyo
  • 1,540
  • 1
  • 6
  • 22
evirdthk
  • 41
  • 1
  • I face the same problem. `cdist` in question is a `torch` operator that measures distance between each two pairs of vectors taken from a pair of sets; it is useful in knn-regression that is likely to be a part of yours (and mine) routine. It seems that the latest version of `torch` `onnx` converter still has no implementation for cdist. The 'solution' would be to either ask torch devs to implement it or volunteer to do it yourself. – Kolya Ivankov May 01 '21 at 08:44

0 Answers0