提交 a1f157f5 authored 作者: james@X40's avatar james@X40

cleaned up rst docs for debugmode

上级 ce714337
...@@ -18,7 +18,7 @@ How do I print an intermediate value in a Function/Method? ...@@ -18,7 +18,7 @@ How do I print an intermediate value in a Function/Method?
Theano provides a 'Print' Op to do this. Theano provides a 'Print' Op to do this.
.. code-block:: .. code-block:: python
x = theano.tensor.dvector('x') x = theano.tensor.dvector('x')
...@@ -37,11 +37,12 @@ Theano provides a 'Print' Op to do this. ...@@ -37,11 +37,12 @@ Theano provides a 'Print' Op to do this.
Since Theano runs your program in a topological order, you won't have precise Since Theano runs your program in a topological order, you won't have precise
control over the order in which multiple Print() Ops are evaluted. For a more control over the order in which multiple Print() Ops are evaluted. For a more
precise inspection of what's being computed where, when, and how, see the precise inspection of what's being computed where, when, and how, see the
:ref:`Stepping through a compiled function with the WrapLinker`. :ref:`wraplinker_faq`.
.. _wraplinker_faq:
How do I step through a compiled function with the WrapLinker? How do I step through a compiled function with the WrapLinker?
-------------------------------------------------------------- --------------------------------------------------------------
...@@ -49,10 +50,11 @@ How do I step through a compiled function with the WrapLinker? ...@@ -49,10 +50,11 @@ How do I step through a compiled function with the WrapLinker?
WRITEME WRITEME
I wrote a new Op, and weird stuff is happening... I wrote a new Op/Type, and weird stuff is happening...
------------------------------------------------- ------------------------------------------------------
First, check the :ref:`Op Contract` and make sure you're following the rules. First, check the :ref:`op_contract` and the :ref:`type_contract`
and make sure you're following the rules.
Then try running your program in :ref:`debugmode`. DebugMode might catch Then try running your program in :ref:`debugmode`. DebugMode might catch
something that you're not seeing. something that you're not seeing.
......
...@@ -18,7 +18,7 @@ cluster. ...@@ -18,7 +18,7 @@ cluster.
DebugMode is easy to use: DebugMode is easy to use:
.. code-block:: .. code-block:: python
x = theano.dvector('x') x = theano.dvector('x')
......
...@@ -1152,6 +1152,28 @@ class DebugMode(Mode): ...@@ -1152,6 +1152,28 @@ class DebugMode(Mode):
`_VariableEquivalenceTracker` classes. `_VariableEquivalenceTracker` classes.
""" """
stability_patience = 10
"""
When checking for the stability of optimization, recompile the graph this many times.
"""
check_c_code = True
"""
Should we evaluate (and check) the `c_code` implementations?
"""
check_py_code = True
"""
Should we evaluate (and check) the `perform` implementations?
"""
diagnostic = None
"""
Log diagnostic information to this file.
"""
# This function will be used to create a FunctionMaker in # This function will be used to create a FunctionMaker in
# function_module.function # function_module.function
def function_maker(self, i,o,m, *args, **kwargs): def function_maker(self, i,o,m, *args, **kwargs):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论