Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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