提交 1e9b1f12 authored 作者: Frederic Bastien's avatar Frederic Bastien

white space fix.

上级 b6286137
...@@ -42,10 +42,10 @@ class CLinkerObject(object): ...@@ -42,10 +42,10 @@ class CLinkerObject(object):
Provide search paths for headers, in addition to those in any relevant environment Provide search paths for headers, in addition to those in any relevant environment
variables. variables.
Hint: for unix compilers, these are the things that get '-I' prefixed in the compiler Hint: for unix compilers, these are the things that get '-I' prefixed in the compiler
cmdline. cmdline.
:Exceptions: :Exceptions:
- `MethodNotDefined`: Subclass does not implement this method - `MethodNotDefined`: Subclass does not implement this method
...@@ -78,10 +78,10 @@ class CLinkerObject(object): ...@@ -78,10 +78,10 @@ class CLinkerObject(object):
Provide search paths for libraries, in addition to those in any relevant environment Provide search paths for libraries, in addition to those in any relevant environment
variables (e.g. LD_LIBRARY_PATH). variables (e.g. LD_LIBRARY_PATH).
Hint: for unix compilers, these are the things that get '-L' prefixed in the compiler Hint: for unix compilers, these are the things that get '-L' prefixed in the compiler
cmdline. cmdline.
:Exceptions: :Exceptions:
- `MethodNotDefined`: Subclass does not implement this method - `MethodNotDefined`: Subclass does not implement this method
...@@ -148,9 +148,9 @@ class CLinkerObject(object): ...@@ -148,9 +148,9 @@ class CLinkerObject(object):
def c_no_compile_args(self): def c_no_compile_args(self):
"""Optional: Return a list of incompatible gcc compiler arguments. """Optional: Return a list of incompatible gcc compiler arguments.
We will remove those arguments from the command line of gcc. So if We will remove those arguments from the command line of gcc. So if
another Op adds a compile arg in the graph that is incompatible another Op adds a compile arg in the graph that is incompatible
with this Op, the incompatible arg will not be used. with this Op, the incompatible arg will not be used.
Useful for instance to remove -ffast-math. Useful for instance to remove -ffast-math.
EXAMPLE EXAMPLE
...@@ -178,7 +178,7 @@ class CLinkerOp(CLinkerObject): ...@@ -178,7 +178,7 @@ class CLinkerOp(CLinkerObject):
Returns C code that does the computation associated to this `Op`, Returns C code that does the computation associated to this `Op`,
given names for the inputs and outputs. given names for the inputs and outputs.
:Parameters: :Parameters:
`node` : Apply instance `node` : Apply instance
WRITEME WRITEME
...@@ -207,8 +207,8 @@ class CLinkerOp(CLinkerObject): ...@@ -207,8 +207,8 @@ class CLinkerOp(CLinkerObject):
QUESTION: is this function optional? QUESTION: is this function optional?
This is a convenient place to clean up things allocated by c_code(). This is a convenient place to clean up things allocated by c_code().
:Parameters: :Parameters:
`node` : Apply instance `node` : Apply instance
WRITEME WRITEME
...@@ -224,7 +224,7 @@ class CLinkerOp(CLinkerObject): ...@@ -224,7 +224,7 @@ class CLinkerOp(CLinkerObject):
`sub` : dict of strings `sub` : dict of strings
extra symbols defined in `CLinker` sub symbols (such as 'fail'). extra symbols defined in `CLinker` sub symbols (such as 'fail').
WRITEME WRITEME
WRITEME WRITEME
:Exceptions: :Exceptions:
...@@ -256,11 +256,11 @@ class PureOp(object): ...@@ -256,11 +256,11 @@ class PureOp(object):
An :term:`Op` is a type of operation. An :term:`Op` is a type of operation.
`Op` is an abstract class that documents the interface for theano's data transformations. `Op` is an abstract class that documents the interface for theano's data transformations.
It has many subclasses, such as It has many subclasses, such as
`sparse dot <http://pylearn.org/epydoc/theano.sparse.Dot-class.html>`__, `sparse dot <http://pylearn.org/epydoc/theano.sparse.Dot-class.html>`__,
and `Shape <http://pylearn.org/epydoc/theano.tensor.Shape-class.html>`__. and `Shape <http://pylearn.org/epydoc/theano.tensor.Shape-class.html>`__.
These subclasses are meant to be instantiated. These subclasses are meant to be instantiated.
An instance has several responsabilities: An instance has several responsabilities:
- making `Apply` instances, which mean "apply this type of operation to some particular inputs" (via `make_node`), - making `Apply` instances, which mean "apply this type of operation to some particular inputs" (via `make_node`),
...@@ -278,7 +278,7 @@ class PureOp(object): ...@@ -278,7 +278,7 @@ class PureOp(object):
""" """
default_output = None default_output = None
""" """
configuration variable for `__call__` configuration variable for `__call__`
A subclass should not change this class variable, but instead over-ride it with a subclass A subclass should not change this class variable, but instead over-ride it with a subclass
...@@ -304,7 +304,7 @@ class PureOp(object): ...@@ -304,7 +304,7 @@ class PureOp(object):
raise utils.MethodNotDefined("make_node", type(self), self.__class__.__name__) raise utils.MethodNotDefined("make_node", type(self), self.__class__.__name__)
def __call__(self, *inputs, **kwargs): def __call__(self, *inputs, **kwargs):
"""Optional: Return some or all output[s] of `make_node`. """Optional: Return some or all output[s] of `make_node`.
It is called by code such as: It is called by code such as:
...@@ -313,8 +313,8 @@ class PureOp(object): ...@@ -313,8 +313,8 @@ class PureOp(object):
x = tensor.matrix() x = tensor.matrix()
# tensor.exp is an Op instance, calls Op.__call__(self=<instance of exp>, inputs=(x,)) # tensor.exp is an Op instance, calls Op.__call__(self=<instance of exp>, inputs=(x,))
y = tensor.exp(x) y = tensor.exp(x)
This class implements a convenience function (for graph-building) which uses This class implements a convenience function (for graph-building) which uses
`default_output`, but subclasses are free to override this function and ignore `default_output`, but subclasses are free to override this function and ignore
`default_output`. `default_output`.
...@@ -344,7 +344,7 @@ class PureOp(object): ...@@ -344,7 +344,7 @@ class PureOp(object):
output storage. Return None. output storage. Return None.
:Parameters: :Parameters:
`node` : Apply instance `node` : Apply instance
contains the symbolic inputs and outputs contains the symbolic inputs and outputs
`inputs` : list `inputs` : list
sequence of inputs (immutable) sequence of inputs (immutable)
...@@ -362,6 +362,6 @@ class PureOp(object): ...@@ -362,6 +362,6 @@ class PureOp(object):
""" """
raise utils.MethodNotDefined("perform", type(self), self.__class__.__name__) raise utils.MethodNotDefined("perform", type(self), self.__class__.__name__)
class Op(utils.object2, PureOp, CLinkerOp): class Op(utils.object2, PureOp, CLinkerOp):
"""Convenience class to bundle `PureOp` and `CLinkerOp`""" """Convenience class to bundle `PureOp` and `CLinkerOp`"""
pass pass
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论