Skip to main content

Neural Networks Wrapper for TensorFlow

Project description

# nn-wtf - Neural Networks Wrapper for TensorFlow

nn-wtf aims at providing a convenience wrapper to Google's
[TensorFlow]( machine learning library.
Its focus is on making neural networks easy to set up, train and use.

The library is in pre-alpha right now and does not do anything seriously useful

## Installation

nn-wtf runs under Python3.4 and above.

### Dependencies

You need to install TensorFlow manually. The installation process depends on
your system. Install the version of TensorFlow built for Python 3.4.

for details.

Example installation for Linux without GPU support:
$ pip install --upgrade

### NN-WTF itself
$ pip install nn_wtf

## Documentation

Sorry the documentation is absolutely minimal at this point. More useful
documentation will be ready by the time this package reaches alpha status.

### List of useful classes and methods

* `NeuralNetworkGraph`: Base class for defining and training neural networks
* `__init__(self, input_size, layer_sizes, output_size, learning_rate)`
* `set_session(self, session=None)`
* `train(self, data_sets, max_steps, precision, steps_between_checks, run_as_check, batch_size)`
* `get_predictor().predict(input_data)`
* `MNISTGraph`: Subclass of NeuralNetworkGraph suitable for working on MNIST data
* `NeuralNetworkOptimizer`: Optimize geometry of a neural network for fast training
* `__init__( self, tested_network, input_size, output_size, training_precision,
layer_sizes, learning_rate, verbose, batch_size)`
* `brute_force_optimal_network_geometry(self, data_sets, max_steps)`

### Usage example

If you want to try it on MNIST data, try this sample program:

from nn_wtf.mnist_data_sets import MNISTDataSets
from nn_wtf.mnist_graph import MNISTGraph

import tensorflow as tf

data_sets = MNISTDataSets('.')
graph = MNISTGraph(
learning_rate=0.1, layer_sizes=(64, 64, 16), train_dir='.'
graph.train(data_sets, max_steps=5000, precision=0.95)

image_data = MNISTDataSets.read_one_image_from_url(
prediction = graph.get_predictor().predict(image_data)
assert prediction == 7

>From there on, you are on your own for now. More functionality and documentation
to come.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nn_wtf, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size nn_wtf-0.1.7.linux-x86_64.tar.gz (81.9 kB) File type Source Python version None Upload date Hashes View
Filename, size nn_wtf-0.1.7-py3.5.egg (105.5 kB) File type Egg Python version 3.5 Upload date Hashes View
Filename, size nn_wtf-0.1.7-py2-none-any.whl (52.7 kB) File type Wheel Python version py2 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page