提交 cb3edced authored 作者: Frederic's avatar Frederic

fix typo and better formulation following code review.

上级 a52012e5
......@@ -20,19 +20,19 @@ Inputs and Outputs are lists of Theano variables
.. note::
This tutorial do not cover how to make an op that return a view or
modify the values in it's inputs. So all
Op done with the instruction here MUST return newly allocated
This tutorial does not cover how to make an op that returns a view or
modify the values in its inputs. So all
Ops created with the instructions here MUST return newly allocated
memory or reuse the memory provided in the parameter
output_storage of the :func:`perform` function. See :ref:`views_and_inplace`
for explanation of how to do this.
If your Op return a view or change the value in its inputs
If your Op returns a view or change the value on its inputs
without doing as said in that page, Theano will run, but will
return good results some graph, but bad results for others.
return good results for some graphs, but bad results for others.
It is recommented that you run your tests in DebugMode (Theano flag
mode=DebugMode) that check if your Op behave correctly in this
mode=DebugMode) that checks if your Op behaves correctly in this
regard.
.. note::
......@@ -291,11 +291,12 @@ To verify the Rop method of the DoubleOp, you can use this:
Running your tests
==================
You can run ``nosetests`` in the Theano folder to run it as all
Theano's tests including yours if inside such directory. You can run
``nosetests test_file.py`` to run only the tests in that file. You can
run ``nosetests test_file.py:test_DoubleRop`` to run only the tests
inside that test class. You can run ``nosetests
You can run ``nosetests`` in the Theano folder to run all of Theano's
tests, including yours if they are somewhere in the directory
structure. You can run ``nosetests test_file.py`` to run only the
tests in that file. You can run ``nosetests
test_file.py:test_DoubleRop`` to run only the tests inside that test
class. You can run ``nosetests
test_file.py:test_DoubleRop.test_double_op`` to run only one
particular test. More `nosetests
<http://readthedocs.org/docs/nose/en/latest/>`_ documentation.
......
......@@ -4,13 +4,13 @@
Sparse
======
This is a very short tutorial on sparse with Theano. There is still
This is a very short tutorial on sparse matrices with Theano. There is still
some not well documented behavior like how we take care of the
gradient. There is 2 types of gradient for sparse operation. ``full
gradient. There are 2 types of gradient for sparse operations. ``full
gradient`` that compute a gradient for values even if they were 0 and
the ``structured gradient`` that returns a gradient only for values
that where not 0. You need to check the code to know witch gradient an
op implement.
that were not 0. You need to check the code to know which gradient an
Op implements.
More documentation in the :ref:`Sparse Library Reference <libdoc_sparse>`.
......
......@@ -6,7 +6,7 @@ from theano.gof.cc import hash_from_code
def hash_from_ndarray(data):
"""Return a hash from an ndarray
It take care of the data, shapes, strides and dtype.
It takes care of the data, shapes, strides and dtype.
"""
# We need to hash the shapes and strides as hash_from_code only hashes
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论