-
-
Save azamsharp/cb07850a6469a69f375ab68d5d974e46 to your computer and use it in GitHub Desktop.
Training Models Using Turi Create
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turicreate as tc | |
# load the data | |
data = tc.SFrame('cats-dogs.sframe') | |
train_data, test_data = data.random_split(0.8) | |
model = tc.image_classifier.create(train_data, target='label') | |
predictions = model.predict(test_data) | |
metrics = model.evaluate(test_data) | |
print(metrics['accuracy']) | |
model.save('mymodel.model') | |
model.export_coreml('CatsAndDogs.mlmodel') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment