提交 1139fcd8 authored 作者: Christof Angermueller's avatar Christof Angermueller

Fix links in sphinx doc

上级 145dc810
...@@ -122,7 +122,7 @@ html_logo = 'images/theano_logo_allblue_200x46.png' ...@@ -122,7 +122,7 @@ html_logo = 'images/theano_logo_allblue_200x46.png'
# Add any paths that contain custom static files (such as style sheets) here, # Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['.static', 'images'] html_static_path = ['.static', 'images', 'library/d3viz/examples']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format. # using the given strftime format.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
.. _libdoc_printing: .. _libdoc_d3viz:
============================================================================ ============================================================================
:mod:`d3viz` -- d3viz: Interactive visualization of Theano compute graphs :mod:`d3viz` -- d3viz: Interactive visualization of Theano compute graphs
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
:synopsis: Allows to interactively visualize Theano compute graphs :synopsis: Allows to interactively visualize Theano compute graphs
.. moduleauthor:: Christof Angermueller .. moduleauthor:: Christof Angermueller
Guide Guide
===== =====
...@@ -39,17 +40,20 @@ web-browser. ``d3viz`` allows ...@@ -39,17 +40,20 @@ web-browser. ``d3viz`` allows
- to visualizing profiling information, and - to visualizing profiling information, and
- to explore nested graphs such as OpFromGraph nodes. - to explore nested graphs such as OpFromGraph nodes.
.. code:: python .. note::
import theano as th This userguide is also avaible as
import theano.tensor as T :download:`IPython notebook <index.ipynb>`.
import numpy as np
As an example, consider the following multilayer perceptron with one As an example, consider the following multilayer perceptron with one
hidden layer and a softmax output layer. hidden layer and a softmax output layer.
.. code:: python .. code:: python
import theano as th
import theano.tensor as T
import numpy as np
ninputs = 1000 ninputs = 1000
nfeatures = 100 nfeatures = 100
noutputs = 10 noutputs = 10
...@@ -105,7 +109,7 @@ the the :py:mod:`theano.d3viz.d3viz` module, which can be called as before: ...@@ -105,7 +109,7 @@ the the :py:mod:`theano.d3viz.d3viz` module, which can be called as before:
import theano.d3viz as d3v import theano.d3viz as d3v
d3v.d3viz(predict, 'examples/mlp.html') d3v.d3viz(predict, 'examples/mlp.html')
`open <./examples/mlp.html>`__ `Open visualization! <../../_static/mlp.html>`_
When you open the output file ``mlp.html`` in your web-browser, you will When you open the output file ``mlp.html`` in your web-browser, you will
see an interactive visualization of the compute graph. You can move the see an interactive visualization of the compute graph. You can move the
...@@ -146,7 +150,7 @@ random data: ...@@ -146,7 +150,7 @@ random data:
d3v.d3viz(predict_profiled, 'examples/mlp2.html') d3v.d3viz(predict_profiled, 'examples/mlp2.html')
`open <./examples/mlp2.html>`__ `Open visualization! <../../_static/mlp2.html>`_
When you open the HTML file in your browser, you will find an additional When you open the HTML file in your browser, you will find an additional
``Toggle profile colors`` button in the menu bar. By clicking on it, ``Toggle profile colors`` button in the menu bar. By clicking on it,
...@@ -162,7 +166,7 @@ language <http://www.graphviz.org/>`__, using the ...@@ -162,7 +166,7 @@ language <http://www.graphviz.org/>`__, using the
`pydot <https://pypi.python.org/pypi/pydot>`__ package, and defines a `pydot <https://pypi.python.org/pypi/pydot>`__ package, and defines a
front-end based on the `d3.js <http://d3js.org/>`__ library to visualize front-end based on the `d3.js <http://d3js.org/>`__ library to visualize
it. However, any other Graphviz front-end can be used, which allows to it. However, any other Graphviz front-end can be used, which allows to
export graphs to different formats. export graps to different formats.
.. code:: python .. code:: python
...@@ -170,15 +174,12 @@ export graphs to different formats. ...@@ -170,15 +174,12 @@ export graphs to different formats.
pydot_graph = formatter(predict_profiled) pydot_graph = formatter(predict_profiled)
pydot_graph.write_png('examples/mlp2.png'); pydot_graph.write_png('examples/mlp2.png');
pydot_graph.write_png('examples/mlp2.pdf');
.. code:: python .. code:: python
Image('./examples/mlp2.png') Image('./examples/mlp2.png')
.. image:: index_files/index_24_0.png .. image:: index_files/index_24_0.png
...@@ -211,7 +212,7 @@ defines a nested graph, which will be visualized accordingly by ...@@ -211,7 +212,7 @@ defines a nested graph, which will be visualized accordingly by
d3v.d3viz(f, 'examples/ofg.html') d3v.d3viz(f, 'examples/ofg.html')
`open <./examples/ofg.html>`__ `Open visualization! <../../_static/ofg.html>`_
In this example, an operation with three inputs is defined, which is In this example, an operation with three inputs is defined, which is
used to build a function that calls this operations twice, each time used to build a function that calls this operations twice, each time
...@@ -241,7 +242,7 @@ the following example. ...@@ -241,7 +242,7 @@ the following example.
d3v.d3viz(f, 'examples/ofg2.html') d3v.d3viz(f, 'examples/ofg2.html')
`open <./examples/ofg2.html>`__ `Open visualization! <../../_static/ofg2.html>`_
Feedback Feedback
-------- --------
...@@ -251,7 +252,7 @@ please let me know! ...@@ -251,7 +252,7 @@ please let me know!
- Christof Angermueller - Christof Angermueller
- cangermueller@gmail.com - cangermueller@gmail.com
- http://cangermueller.com - https://cangermueller.com
References References
......
...@@ -15,6 +15,7 @@ Types and Ops that you can use to build and compile expression graphs. ...@@ -15,6 +15,7 @@ Types and Ops that you can use to build and compile expression graphs.
gradient gradient
config config
printing printing
d3viz/index
compile/index compile/index
sparse/index sparse/index
sparse/sandbox sparse/sandbox
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论