Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
/ mlfizzbuzz Public archive

An ML implementation of the Fizz Buzz Kata

License

Notifications You must be signed in to change notification settings

vmware-archive/mlfizzbuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

An ML implementation of the Fizz Buzz Kata. You can find the implementation up to feature 1 on the fizz_buzz branch. The master branch contains an implementation of feature 2 ("pop") as well.

Credits

Heavily borrowed from Fizz Buzz Tensorflow, "enhanced" with some integration testing, multiclass prediction and the second fizz buzz feature "pop".

How to run

  • Install python 2.7.x: on OSX brew install python, on Linux apt-get python-dev
  • Install virtualenv: pip install virtualenv
  • Create a virtualenv in the repo root folder with the python 2.7 runtime: virtualenv --python=python2.7 .
  • Install dependencies: pip install -r requirements.txt
  • Run the tests: ./run-test

Have fun

You can use this as a sandbox for tensorflow to get a feeling for deep learning / neural networks. What happens if...

  • you add more data (Increase num_digits)?
  • you increase the depth of the network (Increase num_hidden)?
  • you allow the network to learn for longer (Increase num_epochs)?
  • you change the learning_rate?
  • you change the batch_size?
  • you change the optimisation method?
  • you increase the complexity of the model by adding more or different layers in?

Compile Tensorflow manually to get better speed on CPU

  • Here's how to build Tensorflow from source on a Mac
  • Use bazel build -c opt --copt=-mavx --copt=-msse4.2 --copt=-msse4.1 --copt=-msse3 --copt=-mavx2 --copt=-mfma -k //tensorflow/tools/pip_package:build_pip_package when building with bazel to get all the advanced CPU instructions