提交 c4ef38da authored 作者: Francesco Visin's avatar Francesco Visin

Fix broken source links

上级 f27c11e2
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:mod:`debugmode` :mod:`debugmode`
================= =================
.. module:: debugmode .. module:: theano.compile.debugmode
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: defines DebugMode :synopsis: defines DebugMode
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:mod:`function` - defines theano.function :mod:`function` - defines theano.function
=========================================== ===========================================
.. module:: function .. module:: theano.compile.function
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: defines theano.function and related classes :synopsis: defines theano.function and related classes
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:mod:`io` - defines theano.function [TODO] :mod:`io` - defines theano.function [TODO]
=========================================== ===========================================
.. module:: io .. module:: theano.compile.io
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: defines In and Out :synopsis: defines In and Out
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:mod:`mode` -- controlling compilation :mod:`mode` -- controlling compilation
====================================== ======================================
.. module:: mode .. module:: theano.compile.mode
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: controlling compilation :synopsis: controlling compilation
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:mod:`nanguardmode` :mod:`nanguardmode`
=================== ===================
.. module:: nanguardmode .. module:: theano.compile.nanguardmode
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: defines NanGuardMode :synopsis: defines NanGuardMode
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
================================================ ================================================
.. module:: profilemode .. module:: theano.compile.profilemode
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: profiling Theano functions with ProfileMode :synopsis: profiling Theano functions with ProfileMode
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -2,26 +2,40 @@ ...@@ -2,26 +2,40 @@
.. _libdoc_gof_fgraph: .. _libdoc_gof_fgraph:
================================================ ================================================
:mod:`fgraph` -- Graph Container [doc TODO] :mod:`fg` -- Graph Container [doc TODO]
================================================ ================================================
.. module:: fgraph .. module:: theano.gof.fg
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: Theano Internals :synopsis: Theano Internals
.. moduleauthor:: LISA .. moduleauthor:: LISA
Guide .. _fgraph:
=====
FunctionGraph FunctionGraph
------------- -------------
.. autoclass:: theano.gof.FunctionGraph
:members:
***TODO***
.. note:: FunctionGraph(inputs, outputs) clones the inputs by
default. To avoid this behavior, add the parameter
clone=False. This is needed as we do not want cached constants
in fgraph.
.. _libdoc_gof_fgraphfeature: .. _libdoc_gof_fgraphfeature:
.. _fgraphfeature:
FunctionGraph Features FunctionGraph Features
---------------------- ----------------------
.. autoclass:: theano.gof.toolbox.Feature
:members:
.. _libdoc_gof_fgraphfeaturelist: .. _libdoc_gof_fgraphfeaturelist:
FunctionGraph Feature List FunctionGraph Feature List
...@@ -29,14 +43,3 @@ FunctionGraph Feature List ...@@ -29,14 +43,3 @@ FunctionGraph Feature List
* ReplaceValidate * ReplaceValidate
* DestroyHandler * DestroyHandler
Reference
=========
.. class:: FunctionGraph
***TODO***
.. note:: FunctionGraph(inputs, outputs) clones the inputs by
default. To avoid this behavior, add the parameter
clone=False. This is needed as we do not want cached constants
in fgraph.
...@@ -4,14 +4,12 @@ ...@@ -4,14 +4,12 @@
:mod:`graph` -- Interface for the Theano graph :mod:`graph` -- Interface for the Theano graph
============================================== ==============================================
.. module:: graph
:platform: Unix, Windows
:synopsis: Interface for types of symbolic variables
.. moduleauthor:: LISA
--------- ---------
Reference Reference
--------- ---------
.. automodule:: theano.gof.graph .. automodule:: theano.gof.graph
:members: :platform: Unix, Windows
:synopsis: Interface for types of symbolic variables
:members:
.. moduleauthor:: LISA
...@@ -4,14 +4,12 @@ ...@@ -4,14 +4,12 @@
:mod:`type` -- Interface for types of variables :mod:`type` -- Interface for types of variables
================================================ ================================================
.. module:: type
:platform: Unix, Windows
:synopsis: Interface for types of symbolic variables
.. moduleauthor:: LISA
--------- ---------
Reference Reference
--------- ---------
.. automodule:: theano.gof.type .. automodule:: theano.gof.type
:members: :platform: Unix, Windows
:synopsis: Interface for types of symbolic variables
:members:
.. moduleauthor:: LISA
...@@ -8,14 +8,12 @@ ...@@ -8,14 +8,12 @@
from theano.gof.utils import * from theano.gof.utils import *
.. module:: utils
:platform: Unix, Windows
:synopsis: Utilities functions operating on the graph
.. moduleauthor:: LISA
--------- ---------
Reference Reference
--------- ---------
.. automodule:: theano.gof.utils .. automodule:: theano.gof.utils
:members: :platform: Unix, Windows
:synopsis: Utilities functions operating on the graph
:members:
.. moduleauthor:: LISA
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:mod:`printing` -- Graph Printing and Symbolic Print Statement :mod:`printing` -- Graph Printing and Symbolic Print Statement
=============================================================== ===============================================================
.. module:: printing .. module:: theano.printing
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: Provides the Print Op and graph-printing routines. :synopsis: Provides the Print Op and graph-printing routines.
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:mod:`nnet` -- Ops related to neural networks :mod:`nnet` -- Ops related to neural networks
================================================== ==================================================
.. module:: nnet .. module:: theano.tensor.nnet
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: various ops relating to neural networks :synopsis: various ops relating to neural networks
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:mod:`nnet` -- Ops for neural networks :mod:`nnet` -- Ops for neural networks
====================================================== ======================================================
.. module:: tensor.nnet .. module:: theano.tensor.nnet.nnet
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: Ops for neural networks :synopsis: Ops for neural networks
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:mod:`raw_random` -- Low-level random numbers :mod:`raw_random` -- Low-level random numbers
============================================= =============================================
.. module:: raw_random .. module:: theano.tensor.raw_random
:synopsis: symbolic random variables :synopsis: symbolic random variables
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:mod:`shared_randomstreams` -- Friendly random numbers :mod:`shared_randomstreams` -- Friendly random numbers
====================================================== ======================================================
.. module:: shared_randomstreams .. module:: theano.tensor.shared_randomstreams
:platform: Unix, Windows :platform: Unix, Windows
:synopsis: symbolic random variables :synopsis: symbolic random variables
.. moduleauthor:: LISA .. moduleauthor:: LISA
......
.. _fgraph:
=============
FunctionGraph
=============
TODO: clean up/update the doc/check if complete
WRITEME
.. autoclass:: theano.gof.fg.FunctionGraph
.. _fgraphfeature:
Feature
=======
.. autoclass:: theano.gof.toolbox.Feature
:members:
...@@ -8,7 +8,6 @@ Advanced Topics (under construction) ...@@ -8,7 +8,6 @@ Advanced Topics (under construction)
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
fg
compilation compilation
ccodegen ccodegen
function function
......
...@@ -593,10 +593,10 @@ class FunctionGraph(utils.object2): ...@@ -593,10 +593,10 @@ class FunctionGraph(utils.object2):
# callback utils # # callback utils #
def execute_callbacks(self, name, *args, **kwargs): def execute_callbacks(self, name, *args, **kwargs):
""" """Execute callbacks
Calls
getattr(feature, name)(*args) Calls `getattr(feature, name)(*args)` for each feature which has
for each feature which has a method called after name. a method called after name.
""" """
t0 = time.time() t0 = time.time()
...@@ -614,11 +614,11 @@ class FunctionGraph(utils.object2): ...@@ -614,11 +614,11 @@ class FunctionGraph(utils.object2):
self.execute_callbacks_time += time.time() - t0 self.execute_callbacks_time += time.time() - t0
def collect_callbacks(self, name, *args): def collect_callbacks(self, name, *args):
""" """Collects callbacks
Returns a dictionary d such that:
d[feature] == getattr(feature, name)(*args)
For each feature which has a method called after name.
Returns a dictionary d such that
`d[feature] == getattr(feature, name)(*args)`
For each feature which has a method called after name.
""" """
d = {} d = {}
for feature in self._features: for feature in self._features:
...@@ -631,17 +631,18 @@ class FunctionGraph(utils.object2): ...@@ -631,17 +631,18 @@ class FunctionGraph(utils.object2):
# misc # # misc #
def toposort(self): def toposort(self):
""" """Toposort
Return an ordering of the graph's Apply nodes such that:
- All the nodes of the inputs of a node are before that node. Return an ordering of the graph's Apply nodes such that
- Satisfies the orderings provided by each feature that has
* All the nodes of the inputs of a node are before that node.
* Satisfies the orderings provided by each feature that has
an 'orderings' method. an 'orderings' method.
If a feature has an 'orderings' method, it will be called with If a feature has an 'orderings' method, it will be called with
this FunctionGraph as sole argument. It should return a dictionary of this FunctionGraph as sole argument. It should return a dictionary of
{node: predecessors} where predecessors is a list of nodes `{node: predecessors}` where predecessors is a list of nodes that
that should be computed before the key node. should be computed before the key node.
""" """
if len(self.apply_nodes) < 2: if len(self.apply_nodes) < 2:
# optimization # optimization
...@@ -760,17 +761,20 @@ class FunctionGraph(utils.object2): ...@@ -760,17 +761,20 @@ class FunctionGraph(utils.object2):
return self.clone_get_equiv(check_integrity)[0] return self.clone_get_equiv(check_integrity)[0]
def clone_get_equiv(self, check_integrity=True, attach_feature=True): def clone_get_equiv(self, check_integrity=True, attach_feature=True):
"""Clone the graph and get a memo( a dict )that map old node to new node """Clone the graph and get a dict that maps old nodes to new ones
----------------------------
Parameters: Parameters:
check_integrity - { bool } Whether to check integrity. check_integrity: bool
Default is True. Whether to check integrity. Default is True.
attach_feature - { bool } Whether to attach feature of origin graph to attach_feature: bool
cloned graph. Default is True. Whether to attach feature of origin graph to cloned graph.
---------------------------- Default is True.
Returns: Returns:
e - { FunctionGraph } Cloned fgraph. Every node in cloned graph is cloned. e: FunctionGraph
equiv - { dict } A dict that map old node to new node. Cloned fgraph. Every node in cloned graph is cloned.
equiv: dict
A dict that map old node to new node.
""" """
equiv = graph.clone_get_equiv(self.inputs, self.outputs) equiv = graph.clone_get_equiv(self.inputs, self.outputs)
......
""" """
Node classes (`Apply`, `Variable`) and expression graph algorithms. Node classes (`Apply`, `Variable`) and expression graph algorithms.
To read about what theano graphs are from a user perspective, have a look at
`graph.html <../doc/graph.html>`__.
""" """
from __future__ import absolute_import, print_function, division from __future__ import absolute_import, print_function, division
...@@ -1246,9 +1242,9 @@ def as_string(i, o, ...@@ -1246,9 +1242,9 @@ def as_string(i, o,
Input `Variable` s. Input `Variable` s.
o : list o : list
Output `Variable` s. Output `Variable` s.
leaf_formatter : function leaf_formatter : theano.function
Takes a `Variable` and returns a string to describe it. Takes a `Variable` and returns a string to describe it.
node_formatter : function node_formatter : callable
Takes an `Op` and the list of strings corresponding to its arguments Takes an `Op` and the list of strings corresponding to its arguments
and returns a string to describe it. and returns a string to describe it.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论