Skip to content

guidj/fashion-mnist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fashion-mnist

Prediction Fashion-MNIST dataset, using a few different models.

Note: some parts of this task can run on GCP's AI-platform, but as of this writing (January 2020), tensorflow 2.0 isn't technically support. CPU based computations, however, run just fine. But GPU is rather difficult, since CUDA versions between tensorflow 2.0 and AI-platform are currently misaligned -- as I said, tensorflow 2.0 isn't technically supported.

So either deploy a GCE instance with the needed tooling or use an alternative computing environment (e.g. kubeflow).

GCP Config

Copy the file ./sbin/.env to ./sbin/env and define the params.

Data

Downloads data

$ bash ./sbin/data-download-fashion-mnist.sh

Builds features

$ bash ./sbin/build-local-features.sh

Training

Each model has its sub folder of scripts to run training and hyper-parameter tuning.

For training it's:

$ bash ./sbin/{model}/task-local-train.sh

And for hyper-parameter tuning it's:

$ bash ./sbin/{model}/task-local-hps.sh

Evaluation

You can run predictions on a trained and get evaluation scores

$ bash ./sbin/task-local-predict.sh /path/to/model

/path/to/path can be found when model training completes and model is exported.

Models

All models share a common data pre-processing steps:

  • Images are resized from 28x28 to 128x128. This is to enable deeper convolutional which will reduce the size of the image from block to block.
  • Pixel values are normalized to [0, 1] - from [0, 255].
  • Labels are exported with the images as numpy arrays.

The following models are implemented:

FCNN

Standard fully connected neural network. Uses images as is, i.e. flattened arrays.

CVNN: ConvStrix

Convolutional network, inspired by VGG. It uses blocks with sequential convolutional steps, followed by normalization, and pooling.

Transfer learning with VGG19: VGGStrix

A model that uses embeddings from VGG19 and feeds them to a fully connected block. There can also be convolutional blocks before the fully connected ones.

About

Hyper-parameter tuning on fashion-mnist

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published