
.. _extending:

================
Extending Theano
================


This advanced tutorial is for users who want to extend Theano with new Types, new
Operations (Ops), and new graph optimizations.

Along the way, it also introduces many aspects of how Theano works, so it is
also good for you if you are interested in getting more under the hood with
Theano itself.

Before tackling this more advanced presentation, it is highly recommended to read the
introductory :ref:`Tutorial<tutorial>`.

The first few pages will walk you through the definition of a new :ref:`type`,
``double``, and a basic arithmetic :ref:`operations <op>` on that Type. We
will start by defining them using a Python implementation and then we will add
a C implementation.

.. toctree::

    fibby
    pipeline
    theano_vs_c
    graphstructures
    type
    op
    inplace
    other_ops
    ctype
    cop
    optimization
    tips
    unittest
    extending_faq
