Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
d451fc3b
提交
d451fc3b
authored
10月 26, 2015
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix d3viz doc errors.
上级
8d3a67b7
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
26 行增加
和
22 行删除
+26
-22
config.txt
doc/library/config.txt
+0
-0
index.txt
doc/library/d3viz/index.txt
+7
-7
builders.py
theano/compile/builders.py
+1
-1
function_module.py
theano/compile/function_module.py
+1
-1
d3viz.py
theano/d3viz/d3viz.py
+15
-11
utils.py
theano/gof/utils.py
+2
-2
没有找到文件。
doc/library/config.txt
浏览文件 @
d451fc3b
doc/library/d3viz/index.txt
浏览文件 @
d451fc3b
.. _libdoc_d3viz:
=========================================================================
===
=========================================================================
:mod:`d3viz` -- d3viz: Interactive visualization of Theano compute graphs
=========================================================================
===
=========================================================================
.. module:: d3viz
.. module::
theano.
d3viz
:platform: Unix, Windows
:synopsis: Allows to interactively visualize Theano compute graphs
.. moduleauthor:: Christof Angermueller
...
...
@@ -109,7 +109,7 @@ the the :py:mod:`theano.d3viz.d3viz` module, which can be called as before:
import theano.d3viz as d3v
d3v.d3viz(predict, 'examples/mlp.html')
`Open visualization! <../../_static/mlp.html>`_
`Open visualization! <../../_static/mlp.html>`_
_
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
...
...
@@ -150,7 +150,7 @@ random data:
d3v.d3viz(predict_profiled, 'examples/mlp2.html')
`Open visualization! <../../_static/mlp2.html>`_
`Open visualization! <../../_static/mlp2.html>`_
_
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,
...
...
@@ -213,7 +213,7 @@ defines a nested graph, which will be visualized accordingly by
d3v.d3viz(f, 'examples/ofg.html')
`Open visualization! <../../_static/ofg.html>`_
`Open visualization! <../../_static/ofg.html>`_
_
In this example, an operation with three inputs is defined, which is
used to build a function that calls this operations twice, each time
...
...
@@ -243,7 +243,7 @@ the following example.
d3v.d3viz(f, 'examples/ofg2.html')
`Open visualization! <../../_static/ofg2.html>`_
`Open visualization! <../../_static/ofg2.html>`_
_
Feedback
--------
...
...
theano/compile/builders.py
浏览文件 @
d451fc3b
...
...
@@ -14,7 +14,7 @@ class OpFromGraph(gof.Op):
This creates an `Op` from inputs and outputs lists of variables.
The signature is similar to theano.function() and the resulting
`Op`'s perform will do the same operation as:
`Op`'s perform will do the same operation as:
:
orig_function(inputs, outputs, **kwargs)
...
...
theano/compile/function_module.py
浏览文件 @
d451fc3b
...
...
@@ -242,7 +242,7 @@ class Function(object):
A Function instance may be serialized using the `pickle` or
`cPickle` modules. This will save all default inputs, the graph,
and
*** to the pickle file (WRITEME)
.
and
WRITEME to the pickle file
.
A Function instance have a ``trust_input`` field that default to
False. When True, we don't do extra check of the input to give
...
...
theano/d3viz/d3viz.py
浏览文件 @
d451fc3b
...
...
@@ -18,9 +18,9 @@ def replace_patterns(x, replace):
Parameters
----------
s: str
s
: str
String on which function is applied
replace: dict
replace
: dict
`key`, `value` pairs where key is a regular expression and `value` a
string by which `key` is replaced
"""
...
...
@@ -34,7 +34,7 @@ def escape_quotes(s):
Parameters
----------
s: str
s
: str
String on which function is applied
"""
s
=
re
.
sub
(
r'''(['"])'''
,
r'\\\1'
,
s
)
...
...
@@ -66,10 +66,12 @@ def d3viz(fct, outfile, copy_deps=True, *args, **kwargs):
Path to output HTML file.
copy_deps : bool, optional
Copy javascript and CSS dependencies to output directory.
*args : tuple, optional
Arguments passed to PyDotFormatter.
*kwargs : dict, optional
Arguments passed to PyDotFormatter.
Notes
-----
This function accepts extra parameters which will be forwarded to
:class:`theano.d3viz.formatting.PyDotFormatter`.
"""
# Create DOT graph
...
...
@@ -121,10 +123,12 @@ def d3write(fct, path, *args, **kwargs):
A compiled Theano function, variable, apply or a list of variables.
path: str
Path to output file
*args : tuple, optional
Arguments passed to PyDotFormatter.
*kwargs : dict, optional
Arguments passed to PyDotFormatter.
Notes
-----
This function accepts extra parameters which will be forwarded to
:class:`theano.d3viz.formatting.PyDotFormatter`.
"""
formatter
=
PyDotFormatter
(
*
args
,
**
kwargs
)
...
...
theano/gof/utils.py
浏览文件 @
d451fc3b
...
...
@@ -192,13 +192,13 @@ def deprecated(filename, msg=''):
"""
Decorator which will print a warning message on the first call.
Use it like this:
Use it like this:
:
@deprecated('myfile', 'do something different...')
def fn_name(...)
...
And it will print:
And it will print:
:
WARNING myfile.fn_name deprecated. do something different...
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论