PyTorch convert function for op 'fft_rfftn' not implemented

Viewed 155

I am trying to convert a pretrained pytorch model to coreml. I am using coremltools to do this. This is my code.

import torch
import coremltools as ct
traced_model = torch.jit.load("a.jit")
model = ct.convert(traced_model, 
          inputs=[ct.TensorType(shape=image.shape), ct.TensorType(shape=mask.shape)])

I am getting this error "PyTorch convert function for op 'fft_rfftn' not implemented." How can I solve this?

2 Answers

Try use my project: RosaKit, there is implemented STFT, it's might help.

Related