11 lines
277 B
Python
11 lines
277 B
Python
import coremltools as ct
|
|
|
|
|
|
def convert_coreml(model_path, save_path='mobilenet_nnconv5.mlmodel'):
|
|
mlmodel = ct.convert(model_path, inputs=[ct.ImageType()])
|
|
mlmodel.save(save_path)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
convert_coreml('../mobilenet-nnconv5-e12-experimental')
|