pytorch_wavelets icon indicating copy to clipboard operation
pytorch_wavelets copied to clipboard

export to onnx

Open carr123 opened this issue 3 years ago • 1 comments

I build a neural network using ScatLayer as one layer. when I export the model from pytorch to onnx format, error occurs.

pytorch_wavelets\utils.py", line 162, in reflect out = np.where(normed_mod >= rng, rng_by_2 - normed_mod, normed_mod) + minx TypeError: '>=' not supported between instances of 'numpy.ndarray' and 'Tensor'

carr123 avatar Apr 29 '21 10:04 carr123

Ah bummer. Yeah I remember I had to do some funky things to get padding to work in the right way. It's several months later I know, but what command did you use to export to onnx? It might be possible to do the padding with torch tensors so the export works fine.

fbcotter avatar Aug 06 '21 09:08 fbcotter