How to import coremltools

I am trying to convert one of the caffe model to coremltools and use it for demopurposes. https://github.com/BVLC/caffe/tree/master/models/bvlc_reference_caffenet



I installed the python, pip and coremltools on my mac using this command

pip install -U coremltools

successfully .But can't figure out where should i use this functions as described in this example https://developer.apple.com/documentation/coreml/converting_trained_models_to_core_ml



import coremltools 
coreml_model = coremltools.converters.caffe.convert('my_caffe_model.caffemodel')



How can i convert other models to .mlmodel for my project?

you need to make a .py file with the above code then run it using "python <fileName>" just make sure you are running Python 2.7 because that's the only verison coremltools currently supports

How to import coremltools
 
 
Q