Set compute preference: "all", "cpu", "gpu", "neural_engine"
Usage
importpycoremlasml# Load a modelmodel=ml.load_model("MyClassifier.mlmodel")# Get model infoprint(ml.model_description(model))# Run predictionresult=ml.predict(model,{"input_feature":42.0,"image":[0.1,0.2,0.3,...],})print(result)# Control compute unitsml.set_compute_units("neural_engine")# Use Apple Neural Enginemodel=ml.load_model("MyModel.mlmodel")result=ml.predict(model,{"x":1.0})