This is my code:
import turicreate as tcimage_folder = 'image1/训练集'data = tc.image_analysis.load_images(image_folder, with_path=True)data['label'] = data['path'].apply (lambda path: 'D_4015' if 'D_4015' in path else 'DB_013')data.save('diller.sframe')train_data, test_data = data.random_split(0.8, seed=2)model = tc.image_classifier.create(train_data, target='label')predictions = model.predict(test_data)metrics = model.evaluate(test_data)model.export_coreml('diller.mlmodel')
But an error occurred while exporting the model
Error code:
WARNING:root:scikit-learn version 1.1.2 is not supported. Minimum required version: 0.17. Maximum required version: 0.19.2. Disabling scikit-learn conversion API.zsh: illegal hardware instruction /opt/anaconda3/envs/diller/bin/python
How can I solve this problem? Apple computers do not support Apple modules, which surprised me.
This is my code:
import turicreate as tc
image_folder = 'image1/训练集'
data = tc.image_analysis.load_images(image_folder, with_path=True)
data['label'] = data['path'].apply (lambda path: 'D_4015' if 'D_4015' in path else 'DB_013')
data.save('diller.sframe')
train_data, test_data = data.random_split(0.8, seed=2)
model = tc.image_classifier.create(train_data, target='label')
predictions = model.predict(test_data)
metrics = model.evaluate(test_data)
model.export_coreml('diller.mlmodel')
But an error occurred while exporting the model Error code:WARNING:root:scikit-learn version 1.1.2 is not supported. Minimum required version: 0.17. Maximum required version: 0.19.2. Disabling scikit-learn conversion API.
zsh: illegal hardware instruction /opt/anaconda3/envs/diller/bin/python
How can I solve this problem? Apple computers do not support Apple modules, which surprised me.