Solution for “PyTorch convert function for op ‘_record_function_enter’ not implemented.” in CoreMLTools

I get an error and can’t convert (cries)

When converting a Pytorch model with CoreMLTools,
you may encounter the title error.

This model cannot be converted because the necessary operations are not available in CoreMLTools. . .

Solvable

If you think like that, you can actually solve it easily.

The model with the title error is

torch.nn.DataParallel(module, device_ids=None, output_device=None, dim=0)

Isn’t it wrapped in ?

(If not, this solution won’t work, sorry)

This seems to be a module that enables multiprocessing with CPU and GPU, so it is not necessary when converting to CoreML.

So, if you convert the original model that does not wrap, the error in the title will not appear.

How was? Were you able to convert?

🐣

I’m a freelance engineer.
Work consultation
Please feel free to contact us with a brief development description.
rockyshikoku@gmail.com

I am making an app that uses Core ML and ARKit.
We send machine learning / AR related information.

GitHub

Twitter

Medium

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store