提交 43a86c9e authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #1838 from nouiz/fix_doc

Fix doc generation.
...@@ -27,6 +27,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`. ...@@ -27,6 +27,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
**Scan Example: Computing tanh(x(t).dot(W) + b) elementwise** **Scan Example: Computing tanh(x(t).dot(W) + b) elementwise**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
...@@ -54,6 +55,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`. ...@@ -54,6 +55,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
**Scan Example: Computing the sequence x(t) = tanh(x(t - 1).dot(W) + y(t).dot(U) + p(T - t).dot(V))** **Scan Example: Computing the sequence x(t) = tanh(x(t - 1).dot(W) + y(t).dot(U) + p(T - t).dot(V))**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
...@@ -94,6 +96,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`. ...@@ -94,6 +96,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
**Scan Example: Computing norms of lines of X** **Scan Example: Computing norms of lines of X**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
...@@ -113,6 +116,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`. ...@@ -113,6 +116,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
**Scan Example: Computing norms of columns of X** **Scan Example: Computing norms of columns of X**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
...@@ -132,6 +136,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`. ...@@ -132,6 +136,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
**Scan Example: Computing trace of X** **Scan Example: Computing trace of X**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
...@@ -156,6 +161,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`. ...@@ -156,6 +161,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
**Scan Example: Computing the sequence x(t) = x(t - 2).dot(U) + x(t - 1).dot(V) + tanh(x(t - 1).dot(W) + b)** **Scan Example: Computing the sequence x(t) = x(t - 2).dot(U) + x(t - 1).dot(V) + tanh(x(t - 1).dot(W) + b)**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
...@@ -196,6 +202,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`. ...@@ -196,6 +202,7 @@ The full documentation can be found in the library: :ref:`Scan <lib_scan>`.
**Scan Example: Computing the Jacobian of y = tanh(v.dot(A)) wrt x** **Scan Example: Computing the Jacobian of y = tanh(v.dot(A)) wrt x**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
...@@ -221,6 +228,7 @@ Note that we need to iterate over the indices of ``y`` and not over the elements ...@@ -221,6 +228,7 @@ Note that we need to iterate over the indices of ``y`` and not over the elements
**Scan Example: Accumulate number of loop during a scan** **Scan Example: Accumulate number of loop during a scan**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
...@@ -239,6 +247,7 @@ Note that we need to iterate over the indices of ``y`` and not over the elements ...@@ -239,6 +247,7 @@ Note that we need to iterate over the indices of ``y`` and not over the elements
**Scan Example: Computing tanh(v.dot(W) + b) * d where b is binomial** **Scan Example: Computing tanh(v.dot(W) + b) * d where b is binomial**
.. code-block:: python .. code-block:: python
import theano import theano
import theano.tensor as T import theano.tensor as T
import numpy as np import numpy as np
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论