This notebook walks through an example of training a TensorFlow model to do digit classification using the MNIST data set. MNIST is a labeled set of images of handwritten digits.
An example follows.
from __future__ import print_functionThis notebook walks through an example of training a TensorFlow model to do digit classification using the MNIST data set. MNIST is a labeled set of images of handwritten digits.
An example follows.
from __future__ import print_function| import UIKit | |
| import XCPlayground | |
| func isPrime(number: Int) -> Bool { | |
| if number < 2 { return false } | |
| let squareRoot = Int(sqrt(Double(number))) | |
| if squareRoot * squareRoot == number { return false } | |
| for i in 2..<Int(ceil(sqrt(Double(number)))) { | |
| if number % i == 0 { return false } | |
| } |