Code Monkey home page Code Monkey logo

sonnet's Introduction

Sonnet

Sonnet is a library built on top of TensorFlow for building complex neural networks.

Installation

Sonnet can be installed from pip, with or without GPU support.

This installation is compatible with Linux/Mac OS X and Python 2.7 and 3.{4,5,6}. The version of TensorFlow installed must be >= 1.5. Installing Sonnet supports the virtualenv installation mode of TensorFlow, as well as the native pip install.

To install sonnet, run:

$ pip install dm-sonnet

Sonnet will work with both the CPU and GPU version of tensorflow, but to allow for that it does not list Tensorflow as a requirement, so you need to install Tensorflow separately if you haven't already done so.

Usage Example

The following code constructs a Linear module and connects it to multiple inputs. The variables (i.e., the weights and biases of the linear transformation) are automatically shared.

import sonnet as snt

# Provide your own functions to generate data Tensors.
train_data = get_training_data()
test_data = get_test_data()

# Construct the module, providing any configuration necessary.
linear_regression_module = snt.Linear(output_size=FLAGS.output_size)

# Connect the module to some inputs, any number of times.
train_predictions = linear_regression_module(train_data)
test_predictions = linear_regression_module(test_data)

Documentation

Check out the full documentation page here.

sonnet's People

Contributors

adria-p avatar albertz avatar bfredl avatar dekked avatar diegolascasas avatar dm-jrae avatar dustinvtran avatar fastturtle avatar fbesse avatar fvioladm avatar guillaume-chevalier avatar justheuristic avatar kashif avatar liusiqi43 avatar malcolmreynolds avatar sracaniere avatar tmramalho avatar tomhennigan avatar torstenrudolf avatar vastolorde95 avatar vierja avatar vinhngx avatar yazhe-li avatar

Watchers

 avatar  avatar

Forkers

steliord

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.