Code Monkey home page Code Monkey logo

prashish14 / tensorflow- Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 2.29 MB

Working with Tensorflow is fun. I started it as a job at SSR Lab but now I am proficient . It is one of the most powerful framework for deep learning and Distributed computing.With the release of TensorFlow, innovation in artificial intelligence will dramatically increase. On top of that, we will see many new platforms made specifically for TensorFlow. If you are at all interested in machine learning, I suggest you start hacking on top of TensorFlow

Python 96.09% Jupyter Notebook 3.91%

tensorflow-'s Introduction

Tensorflow-

Working with Tensorflow is fun. I started it as a job at SSR Lab but now I am proficient . It is one of the most powerful framework for deep learning and Distributed computing.With the release of TensorFlow, innovation in artificial intelligence will dramatically increase. On top of that, we will see many new platforms made specifically for TensorFlow. If you are at all interested in machine learning, I suggest you start hacking on top of TensorFlow

tensorflow-'s People

Contributors

prashish14 avatar

Stargazers

Timothy avatar

Watchers

James Cloos avatar  avatar

tensorflow-'s Issues

Tensorflow vs Caffee Pros and Cons

TensorFlow

TensorFlow is about more than deep learning. TensorFlow actually has tools to support reinforcement learning and other algos.

Pros and Cons
(+) Python + Numpy
(+) Computational graph abstraction, like Theano
(+) Faster compile times than Theano
(+) TensorBoard for visualization

(+) Data and model parallelism

(-) Slower than other frameworks
(-) Much “fatter” than Torch; more magic
(-) Not many pretrained models
(-) Computational graph is pure Python, therefore slow
(-) No commercial support
(-) Drops out to Python to load each new training batch
(-) Not very toolable
(-) Dynamic typing is error-prone on large software projects
Caffe

Caffe is a well-known and widely used machine-vision library that ported Matlab’s implementation of fast convolutional nets to C and C++ (see Steve Yegge’s rant about porting C++ from chip to chip if you want to consider the tradeoffs between speed and this particular form of technical debt). Caffe is not intended for other deep-learning applications such as text, sound or time series data. Like other frameworks mentioned here, Caffe has chosen Python for its API.

Both Deeplearning4j and Caffe perform image classification with convolutional nets, which represent the state of the art. In contrast to Caffe, Deeplearning4j offers parallel GPU support for an arbitrary number of chips, as well as many, seemingly trivial, features that make deep learning run more smoothly on multiple GPU clusters in parallel. While it is widely cited in papers, Caffe is chiefly used as a source of pre-trained models hosted on its Model Zoo site. Deeplearning4j is building a parser to import Caffe models to Spark.

Pros and Cons:

(+) Good for feedforward networks and image processing
(+) Good for finetuning existing networks
(+) Train models without writing any code
(+) Python interface is pretty useful
(-) Need to write C++ / CUDA for new GPU layers
(-) Not good for recurrent networks
(-) Cumbersome for big networks (GoogLeNet, ResNet)
(-) Not extensible, bit of a hairball
(-) No commercial support

Comparison of TensorFlow/Caffee/Theano/CNTK and torch for Machine Learning

Modeling Capability

In this section, we evaluate each toolkit's ability to train common and state-of-the-art networks without writing too much code. Some of these networks are:

ConvNets: AlexNet, OxfordNet, GoogleNet
RecurrentNets: plain RNN, LSTM/GRU, bidirectional RNN
Sequential modeling with attention.
In addition, we also evaluate the flexibility to create a new type of model.

Caffe

Caffe is perhaps the first mainstream industry-grade deep learning toolkit, started in late 2013, due to its excellent convnet implementation (at the time). It is still the most popular toolkit within the computer vision community, with many extensions being actively added.

However, its support for recurrent networks and language modeling in general is poor, due to its legacy architecture, which's limitations are detailed in the architecture section.

CNTK

CNTK is a deep learning system started by the speech people who started the deep learning craze and grown into a more general platform-independent deep learning system. It is better known in the speech community than in the general deep learning community.

In CNTK (as in TensorFlow and Theano), a network is specified as a symbolic graph of vector operations, such as matrix add/multiply or convolution. A layer is just a composition of those operations. The fine granularity of the building blocks (operations) allows users to invent new complex layer types without implementing them in a low-level language (as in Caffe).

As of today, CNTK is not usable for a variety of tasks such as sequence-2-sequence.

TensorFlow

State-of-the-art models

RNN API and implementation are suboptimal. The team also commented about it here and here.
Bidirectional RNN not available yet
No 3D convolution, which is useful for video recognition
New models Since TF uses symbolic graph of vector operations approach, specifying a new network is fairly easy. Although it doesn't support symbolic loop yet (at least not well tested/documented, as of 05/2016), RNNs can be made easy and efficient using the bucketing trick.

However, TF has a major weakness in terms of modeling flexibility. Every computational flow has be constructed as a static graph. That makes some computations difficult, such as beam search (which is used frequently in sequence prediction tasks).

Theano

State-of-the-art models. Theano has implementation for most state-of-the-art networks, either in the form of a higher-level framework (e.g. Blocks, Keras, etc.) or in pure Theano.

New models. Theano pioneered the trend of using symbolic graph for programming a network. Theano's symbolic API supports looping control, so-called scan, which makes implementing RNNs easy and efficient. Users don't always have to define a new model at the tensor operations level. There are a few higher-level frameworks, mentioned above, which make model definition and training simpler.

Torch

State-of-the-art models

Excellent for conv nets. It's worth noting that temporal convolution can be done in TensorFlow/Theano via conv2d but that's a trick. The native interface for temporal convolution in Torch makes it slightly more intuitive to use.
Rich set of RNNs available through a non-official extension [2]
New models. In Torch, there are multiple ways (stack of layers or graph of layers) to define a network but essentially, a network is defined as a graph of layers. Because of this coarser granularity, Torch is sometimes considered less flexible because for new layer types, users have to implement the full forward, backward, and gradient input update.

However, unlike Caffe, defining a new layer in Torch is much easier because you don't have to program in C++. Plus, in Torch, the difference between new layer definition and network definition is minimal. In Caffe, layers are defined in C++ while networks are defined via Protobuf.

Torch is more flexible than TensorFlow and Theano in that it is imperative while TF/Theano are declarative (i.e. one has to declare a computational graph). That makes some operations, e.g. beam search, much easier to do in Torch.

Left: graph model of CNTK/Theano/TensorFlow; Right: graph model of Caffe/Torch

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.