This file contains hidden or 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
# Model definition | |
# See: https://github.com/FluxML/model-zoo/blob/master/vision/mnist/conv.jl | |
model = Chain( | |
# First convolution, operating upon a 28x28 image | |
Conv((3, 3), 1=>16, pad=(1,1), relu), | |
MaxPool((2,2)), #maxpooling | |
# Second convolution, operating upon a 14x14 image | |
Conv((3, 3), 16=>32, pad=(1,1), relu), | |
MaxPool((2,2)), #maxpooling |
This file contains hidden or 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
# Loading packages and data | |
# See: https://github.com/FluxML/model-zoo/blob/master/vision/mnist/conv.jl | |
using Flux, Flux.Data.MNIST, Statistics | |
using Flux: onehotbatch, onecold, crossentropy, throttle | |
using Base.Iterators: repeated, partition | |
using Printf, BSON | |
using ImageView | |
using Plots | |
# Load labels and images from Flux.Data.MNIST |
NewerOlder