Chainer - a Python-based framework for neural networks

Chainer is a powerful, flexible, and intuitive framework for neural networks, written in Python.

Chainer is a flexible Python framework for neural networksChainer is a flexible Python-based framework for neural networks. It was developed by Preferred Networks, a startup based in Japan. This framework allows writing complex architectures simply and intuitively.

Chainer features:

  • CUDA computation and multi-GPU support via PyCUDA;
  • different network architectures (feed-forward nets, convnets, recurrent nets, recursive nets, per-batch architectures);
  • multi-dimensional array and layer implementations;
  • forward computation, control flow statements, predefined functions;
  • forward prop for processing the input data;
  • backprop for gradient computing;
  • “Define-by-Run” scheme as the core concept.

Usually deep learning frameworks are based on the “Define-and-Run” scheme. According to which, at the beginning a computational graph is constructed and a network is statically defined and fixed. User periodically feeds it with minibatches to do forward/backward computation. In this case there is little need of memory management, since all the logic is embedded into the network architecture as data. But this approach has several drawbacks, like difficult debugging of network definition and compulsory use of interpreters with capability of defining forward computations.

That is why Chainer’s design is based on the principle “Define-by-Run” - network is not pre-defined at the beginning, but is dynamically defined on-the-fly. It uses forward computation - written as a regular program code with special variables and operators, allowing arbitrary control flow statements. The computational graph can be modified within the loop/iteration. All of the above makes forward computation intuitive and easy to debug. Within “Define-by-Run” scheme, rather than storing programming logic, Chainer saves the history of computation and programming logic in Python can be used at its fullest potential.

Chainer is powerful, flexible and intuitive framework of neural networks that supports almost arbitrary architectures. It helps to “bridge the gap between algorithms and implementations of deep learning”. To get more information you can visit Chainer website or browse its code in Github repository.

Connect with our experts Let's talk