Skip to content

Commit

Permalink
README for CIFAR and tweaks to MNIST README
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrett Smith committed Jan 16, 2017
1 parent a4a68bb commit 6bc6ccc
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 5 deletions.
97 changes: 97 additions & 0 deletions cifar10/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# CIFAR10

This is a [Guild AI](http://guild.ai) example that defines a CIFAR10
model based on TensorFlow's excellent [Convolutional Neural
Networks](https://www.tensorflow.org/tutorials/deep_cnn/) Guide.

## Project files

- **[Guild](Guild)** - Guild project file ([more info](https://guild.ai/project-reference/))
- **[samples.py](samples.py)** - Implementation of the *samples* resource
- **[single.py](expert.py)** - Training script for single GPU
- **[support.py](support.py)** - Shared code across training scripts
- **[upstream_single.py](upstream_single.py)** - Wrapper to train
using the original TensorFlow (upstream) script for single GPU

## Requirements

To work with this project, [ensure that you have Guild AI installed along
with its requirements](https://guild.ai/getting-started/setup/).

If you haven't already, clone Guild AI examples:

```
$ git clone https://github.com/guildai/guild-examples.git
```

## Training

Prepare and train the CIFAR10 model:

``` bash
$ cd guild-examples/cifar10
$ guild prepare
$ guild train
```

The `prepare` command downloads the CIFAR10 data, which will be used
for subsequent operations.

## Viewing

At any point you can view project run results by in [Guild
View](https://guild.ai/user-guide/guild-view) by running the
`view` command in a separate terminal:

``` bash
$ guild view
```

Guild View runs on port `6333` by default — to view it,
open [http://localhost:6333](http://localhost:6333) in your browser.

## Evaluating

To calculate the most recently trained model's final accuracy using
test data, use the `evaluate` command:

``` bash
$ guild evaluate --latest-run
```

## Serving

To run a model as an HTTP service in [Guild
Serve](https://guild.ai/user-guide/guild-serve/) run:

``` bash
$ guild serve RUN
```

where `RUN` is a value returned by `list-runs` (i.e. a path to the run
directory) or `--latest-run` to serve the model exported in the last
run.

## Generating sample inputs

This example provides a `samples` resource that can be used to
generate a number of MNIST images and their corresponding JSON
encodings. These file can be used to run ad hoc inference on the model
in Guild View (see the **Serve** tab) or Guild Serve
(see [Serving](#user-content-serving) above).

Images are generated from the MNIST training/test data.

To generate samples, run:

``` bash
$ guild prepare samples
```

This will create a local `samples` subdirectory containing the samples
images.

## More about Guild AI

For more information about the Guild AI project, see
[https://guild.ai](https://guild.ai).
14 changes: 9 additions & 5 deletions mnist/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MNIST

This is a [Guild AI](http://guild.ai) example that provides two MNIST
This is a [Guild AI](http://guild.ai) example that defines two MNIST
models:

- **intro** - logistic regression
Expand All @@ -19,7 +19,7 @@ themselves — are from TensorFlow's excellent

## Requirements

To work with these models, [ensure that you have Guild AI installed along
To work with this project, [ensure that you have Guild AI installed along
with its requirements](https://guild.ai/getting-started/setup/).

If you haven't already, clone Guild AI examples:
Expand All @@ -39,7 +39,7 @@ $ guild train
```

The `prepare` command downloads the MNIST data, which will be used for
all subsequent trainin.
subsequent operations.

This project is configured to train the `intro` model by trained. You
can train `expert` by specifying it explicitly:
Expand All @@ -51,7 +51,7 @@ $ guild train expert

## Viewing

At any point you can project run results by in [Guild
At any point you can view project run results by in [Guild
View](https://guild.ai/user-guide/guild-view) by running the
`view` command in a separate terminal:

Expand All @@ -77,9 +77,13 @@ To run a model as an HTTP service in [Guild
Serve](https://guild.ai/user-guide/guild-serve/) run:

``` bash
$ guild serve
$ guild serve RUN
```

where `RUN` is a value returned by `list-runs` (i.e. a path to the run
directory) or `--latest-run` to serve the model exported in the last
run.

## Generating sample inputs

This example provides a `samples` resource that can be used to
Expand Down

0 comments on commit 6bc6ccc

Please sign in to comment.