:orphan:

.. _opfromgraph:

===========
OpFromGraph
===========

This page describes :class:`theano.OpFromGraph
<theano.compile.builders.OpFromGraph>`, an Op that allows to
encapsulate a Theano graph in an op.

This can be used to encapsulate some functionality in one block. It is
useful to scale Theano compilation for regular bigger graphs when we
reuse that encapsulated fonctionality with different inputs many
times. Due to this encapsulation, it can make Theano compilation phase
faster for graphs with many nodes.

Using this for small graphs is not recommended as it disables
optimizations between what is inside the encapsulation and outside of it.

.. note:

    This was not used widely up to now. If you have any
    questions/comments do not hesitate to contact us on the mailing list.



.. autoclass:: theano.compile.builders.OpFromGraph
