coremltools
coremltools copied to clipboard
Util to expose intermediate tensors as outputs
🌱 Describe your Feature Request
Sometimes when debugging a CoreML model it can be difficult to know where exactly inside of the model it is failing. I wrote a script for myself to expose intermediate tensors as model outputs without having to reconvert the model. It saved me a bunch of time, so was curious if it's the sort of thing that would be useful in the utils
package.
How can this feature be used?
Any time your model outputs look wrong, you can trace through and compare with a source (e.g. PyTorch) model to see where they started to drift apart.
Describe alternatives you've considered
In the past I've manually de-composed my PyTorch model and re-converted each piece. It works but it's tedious.
Additional context
My script is here.