-
-
Save fitomad/e62c266a8faf740d7655b2e9bc9214a6 to your computer and use it in GitHub Desktop.
This file contains 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
// Creamos el modelo... | |
if let classifier = try? MLImageClassifier(trainingData: trainingDataSource, parameters: parameter) | |
{ | |
// ...y sus metadatos | |
var modelMetadata = MLModelMetadata() | |
modelMetadata.author = "Adolfo" | |
modelMetadata.shortDescription = "The Big Bang Theory Image Classifier" | |
modelMetadata.license = "MIT" | |
modelMetadata.version = "1" | |
modelMetadata.additional = [ | |
"data_description" : "10 imágenes para cada personaje (Penny, Sheldon, Leonard y Raj)", | |
"image_format" : "JPEG" | |
] | |
// Exportamos el modelo | |
do | |
{ | |
try classifier.write(toFile: "/Users/adolfo/Desktop/TBBTImageClassifier", metadata: modelMetadata) | |
} | |
catch | |
{ | |
print("No se puede guardar el modelo") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment