Skip to content

Instantly share code, notes, and snippets.

@fitomad fitomad/createml-3_save.swift Secret
Created Oct 24, 2018

What would you like to do?
// Creamos el modelo...
if let classifier = try? MLImageClassifier(trainingData: trainingDataSource, parameters: parameter)
// ...y sus metadatos
var modelMetadata = MLModelMetadata() = "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
try classifier.write(toFile: "/Users/adolfo/Desktop/TBBTImageClassifier", metadata: modelMetadata)
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
You can’t perform that action at this time.