Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//
// MARK: - CoreML Methods
//
extension TablaViewController
{
/**
Predice el doble de un número usando un modelo `CoreML`
- Parameter for: Número del que queremos averiguar su doble
- Returns: El doble en caso que la predicción se haya realizado bien
*/
private func predictResult(for number: Int) -> Int?
{
guard let prediction = try? model.prediction(multiplicador: Double(number)) else
{
return nil
}
return Int(prediction.resultado)
}
}
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.