Note that we need to iterate over the indices of ``y`` and not over the elements of ``y``. The reason is that scan create a placeholder variable for its internal function and this placeholder variable does not have the same dependencies than the variables that will replace it.
Note that we need to iterate over the indices of ``y`` and not over the elements of ``y``. The reason is that scan create a placeholder variable for its internal function and this placeholder variable does not have the same dependencies than the variables that will replace it.
...
@@ -230,14 +229,14 @@ Note that we need to iterate over the indices of ``y`` and not over the elements
...
@@ -230,14 +229,14 @@ Note that we need to iterate over the indices of ``y`` and not over the elements
Note that if you want to use a random variable ``d`` that will not be updated through scan loops, you should pass this variable as a ``non_sequences`` arguments.
Note that if you want to use a random variable ``d`` that will not be updated through scan loops, you should pass this variable as a ``non_sequences`` arguments.
**Scan Example: Computing pow(A,k)**
**Scan Example: Computing pow(A,k)**
.. code-block:: python
.. code-block:: python
...
@@ -290,7 +289,7 @@ Note that if you want to use a random variable ``d`` that will not be updated th
...
@@ -290,7 +289,7 @@ Note that if you want to use a random variable ``d`` that will not be updated th
power = theano.function(inputs=[A, k], outputs=final_result,
power = theano.function(inputs=[A, k], outputs=final_result,