Use image type for CoreML input, reshape last layer to work with metal shader

This commit is contained in:
Piv
2021-09-10 22:13:41 +09:30
parent a72f04006f
commit 28b11aaa44
2 changed files with 3 additions and 2 deletions

View File

@@ -1,8 +1,8 @@
import coremltools as ct
def convert_coreml(model_path, save_path='../mobilenet_nnconv5.mlmodel'):
mlmodel = ct.convert(model_path)
def convert_coreml(model_path, save_path='mobilenet_nnconv5.mlmodel'):
mlmodel = ct.convert(model_path, inputs=[ct.ImageType()])
mlmodel.save(save_path)