MLaaS.mnist_img

File : mnist_img.py Author : Valentin Kuznetsov Description:

Module Contents

Classes

OptionParser

Functions

readImage

Helper function to read MNIST image

img2json

Convert given image to JSON data format used by TFaaS

main

main function to produce image file from mnist dataset. MNIST dataset can be downloaded from curl -O http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz

API

MLaaS.mnist_img.readImage(fname, fout, num_images=5, imgId=2)

Helper function to read MNIST image

MLaaS.mnist_img.img2json(image)

Convert given image to JSON data format used by TFaaS

class MLaaS.mnist_img.OptionParser

Initialization

User based option parser

MLaaS.mnist_img.main()

main function to produce image file from mnist dataset. MNIST dataset can be downloaded from curl -O http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz