TF Stage

A fast and canonical project setup for TensorFlow models. The most difficult part of getting started with TensorFlow isn’t deep learning, it’s putting together hundreds of API calls into a cohesive model. TFStage stubs out a new TensorFlow project and includes hooks for deployment either locally or to Google Cloud.

View it on Github: https://github.com/fomorians/tfstage


TensorFlow Project Scaffolding

  1. run the tfstage command line tool
  2. run the generated project code to verify everything works.
  3. search and replace the `TODO` comments in the code which mark important changes.
Graph showing the distribution of even numbers in the set. Slopes downward at an approximate 45 degree angle from left to right.

Setup Instructions

  1. Clone repo:

    git clone [email protected]:fomorians/tfstage.git
    
  2. Install tfstage:

    pip install tfstage
    
  3. Create a new empty project directory

    $ mkdir my_project/
    $ cd my_project/
    
  4. Run tfstage my_project:

    $ tfstage my_project
    Project created: ./my_project
    

    This stubs out a completely runnable TensorFlow project using a simple XOR dataset and model.

  5. (Optional) Test run your new project:

    $ python -m my_project.main --job-dir logs/
    
    ...
    
    INFO:tensorflow:Saving checkpoints for 1 into logs/model.ckpt.
    INFO:tensorflow:loss = 1.20236, step = 1
    INFO:tensorflow:Starting evaluation at 2017-07-13-18:22:20
    INFO:tensorflow:Restoring parameters from logs/model.ckpt-1
    
    ...
    
  6. (Optional) View help / advanced options:

    $ tfstage --help
    usage: tfstage [-h] name
    
    TensorFlow project scaffolding
    
    positional arguments:
      name                  Project name
      install_dependencies  Install pip dependencies
    
    optional arguments:
      -h, --help            show this help message and exit
    

Full documentation on Github: https://github.com/fomorians/tfstage