I don’t know, what multiArray is and I assume it’s part of the CoreML model? If so, I would recommend to ask in their board or github.


Yes, as answered here 17 with an example.


If neither you nor the engineer who was working on the model knows, which preprocessing was done, unfortunately we cannot help. My best shot is still to retrain the model with a known preprocessing pipeline.
Depending what preprocessing steps were done, ONNX might support them. E.g. normalization is a simple subtraction and division, which is supported by ONNX. More complicated image transformation might not be supported and you should implement them in CoreML or any other library supported by your deployment platform. Since we do not know which preprocessing was done, it won’t really help discussing, which methods are implemented in ONNX etc.


MultiArray doesn’t seem to be a PyTorch class and it seem your question was already answered in the onnx-coreml github 9.



 MarcSteven:

Actually in Python training code, it should have preprocess_input or normalize function, but if the training model doesn’t have the step, does it influence the result?


Normalization usually speeds up the training or makes it possible in the first place.
If normalization or any other preprocessing technique was already used to train your model, you have to add these steps to your deployment pipeline. Otherwise your model will just output random values and will most likely yield a bad accuracy.