If you receive the following error, it is because the Python function *__len__* cannot
If you receive the following error, it is because the Python function *__len__* cannot
be implemented on Theano variables:
be implemented on Theano variables:
.. code-block:: python
.. code-block:: python
...
@@ -17,7 +22,7 @@ be implemented on Theano variables:
...
@@ -17,7 +22,7 @@ be implemented on Theano variables:
Python requires that *__len__* returns an integer, yet it cannot be done as Theano's variables are symbolic. However, `var.shape[0]` can be used as a workaround.
Python requires that *__len__* returns an integer, yet it cannot be done as Theano's variables are symbolic. However, `var.shape[0]` can be used as a workaround.
This error message cannot be made more explicit because the relevant aspects of Python's
This error message cannot be made more explicit because the relevant aspects of Python's
internals cannot be modified.
internals cannot be modified.
...
@@ -64,10 +69,10 @@ compilation but it will also use more memory because
...
@@ -64,10 +69,10 @@ compilation but it will also use more memory because
in a trade off between speed of compilation and memory usage.
in a trade off between speed of compilation and memory usage.
Theano flag `reoptimize_unpickled_function` controls if an unpickled theano function
Theano flag `reoptimize_unpickled_function` controls if an unpickled theano function
should reoptimize its graph or not. Theano users can use the standard python pickle
should reoptimize its graph or not. Theano users can use the standard python pickle
tools to save a compiled theano function. When pickling, both graph before and
tools to save a compiled theano function. When pickling, both graph before and
after the optimization are saved, including shared variables. When set to True,
after the optimization are saved, including shared variables. When set to True,
the graph is reoptimized when being unpickled. Otherwise, skip the graph optimization
the graph is reoptimized when being unpickled. Otherwise, skip the graph optimization
and use directly the optimized graph from the pickled file. After Theano 0.7,
and use directly the optimized graph from the pickled file. After Theano 0.7,
the default changed to False.
the default changed to False.
...
@@ -197,7 +202,7 @@ We try to list in this `wiki page <https://github.com/Theano/Theano/wiki/Related
...
@@ -197,7 +202,7 @@ We try to list in this `wiki page <https://github.com/Theano/Theano/wiki/Related
--------------------------------
--------------------------------
Theano offers a good amount of flexibility, but has some limitations too.
Theano offers a good amount of flexibility, but has some limitations too.
You must answer for yourself the following question: How can my algorithm be cleverly written
You must answer for yourself the following question: How can my algorithm be cleverly written