ó
àÆ÷Xc           @` s¦   d  Z  d d l m Z m Z m Z d Z d Z d Z d Z d d l	 m
 Z
 d d l m Z d d	 l m Z d d
 l m Z m Z m Z m Z d d l m Z m Z d S(   s‡  
This module provides the Scan Op.

Scanning is a general form of recurrence, which can be used for looping.
The idea is that you *scan* a function along some input sequence, producing
an output at each time-step that can be seen (but not modified) by the
function at the next time-step. (Technically, the function can see the
previous K  time-steps of your outputs and L time steps (from the past and
future) of your inputs.

So for example, ``sum()`` could be computed by scanning the ``z+x_i``
function over a list, given an initial state of ``z=0``.

Special cases:

* A *reduce* operation can be performed by returning only the last
  output of a ``scan``.
* A *map* operation can be performed by applying a function that
  ignores previous steps of the outputs.

Often a for-loop can be expressed as a ``scan()`` operation, and ``scan`` is
the closest that theano comes to looping. The advantage of using ``scan``
over for loops is that it allows the number of iterations to be a part of
the symbolic graph.

The Scan Op should typically be used by calling any of the following
functions: ``scan()``, ``map()``, ``reduce()``, ``foldl()``,
``foldr()``.

i    (   t   absolute_importt   print_functiont   divisions   restructedtext ensN   Razvan Pascanu Frederic Bastien James Bergstra Pascal Lamblin Arnaud Bergeron s    (c) 2010, Universite de Montreals    Razvan Pascanu <r.pascanu@gmail>(   t   scan_opt(   t   scan(   t   scan_checkpoints(   t   mapt   reducet   foldlt   foldr(   t   clonet   untilN(   t   __doc__t
   __future__R    R   R   t   __docformat__t   __authors__t   __copyright__t   __contact__t   theano.scan_moduleR   t   theano.scan_module.scanR   t#   theano.scan_module.scan_checkpointsR   t   theano.scan_module.scan_viewsR   R   R   R	   t   theano.scan_module.scan_utilsR
   R   (    (    (    s;   /tmp/pip-build-X4mzal/theano/theano/scan_module/__init__.pyt   <module>   s   "