Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
93fd1955
提交
93fd1955
authored
8月 24, 2015
作者:
Christof Angermueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update menu bar
上级
e7750bc4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
23 行增加
和
15 行删除
+23
-15
d3viz.css
theano/d3viz/css/d3viz.css
+9
-1
formatting.py
theano/d3viz/formatting.py
+5
-3
template.html
theano/d3viz/html/template.html
+4
-4
d3viz.js
theano/d3viz/js/d3viz.js
+5
-7
没有找到文件。
theano/d3viz/css/d3viz.css
浏览文件 @
93fd1955
...
@@ -4,7 +4,15 @@ svg {
...
@@ -4,7 +4,15 @@ svg {
display
:
block
;
display
:
block
;
position
:
fixed
;
position
:
fixed
;
border
:
0px
solid
black
;
border
:
0px
solid
black
;
top
:
5%
;
left
:
0%
;
right
:
0%
bottom
=
10%
top
:
32px
;
left
:
0%
;
right
:
0%
bottom
=
0%
}
.menuBar
{
border-bottom
:
1px
solid
black
;
height
:
22px
;
}
input
.menuBar
{
}
}
.nodeRect
{
.nodeRect
{
...
...
theano/d3viz/formatting.py
浏览文件 @
93fd1955
...
@@ -34,6 +34,11 @@ class PyDotFormatter(object):
...
@@ -34,6 +34,11 @@ class PyDotFormatter(object):
:param compact: if True, will remove intermediate variables without
:param compact: if True, will remove intermediate variables without
name.
name.
"""
"""
if
not
pydot_imported
:
raise
RuntimeError
(
"Failed to import pydot. You must install pydot"
" for `pydotprint` to work."
)
self
.
compact
=
compact
self
.
compact
=
compact
self
.
node_colors
=
{
'input'
:
'limegreen'
,
self
.
node_colors
=
{
'input'
:
'limegreen'
,
'constant_input'
:
'SpringGreen'
,
'constant_input'
:
'SpringGreen'
,
...
@@ -106,9 +111,6 @@ class PyDotFormatter(object):
...
@@ -106,9 +111,6 @@ class PyDotFormatter(object):
outputs
=
fct
)
outputs
=
fct
)
outputs
=
fct
.
outputs
outputs
=
fct
.
outputs
topo
=
fct
.
toposort
()
topo
=
fct
.
toposort
()
if
not
pydot_imported
:
raise
RuntimeError
(
"Failed to import pydot. You must install pydot"
" for `pydotprint` to work."
)
outputs
=
list
(
outputs
)
outputs
=
list
(
outputs
)
# Loop over apply nodes
# Loop over apply nodes
...
...
theano/d3viz/html/template.html
浏览文件 @
93fd1955
...
@@ -10,20 +10,20 @@
...
@@ -10,20 +10,20 @@
<script
type=
'text/javascript'
src=
"%% JS_DIR %%/d3-context-menu.js"
></script>
<script
type=
'text/javascript'
src=
"%% JS_DIR %%/d3-context-menu.js"
></script>
</head>
</head>
<body>
<body>
<div
id=
'menu'
>
<div
id=
'menu'
class=
'menuBar'
>
<input
name=
"resetNodes"
<input
name=
"resetNodes"
type=
"button"
type=
"button"
value=
"Reset nodes"
value=
"Reset nodes"
onclick=
"resetNodes()"
/>
onclick=
"resetNodes()"
/>
<input
name=
"releaseNodes"
<input
name=
"releaseNodes"
type=
"button"
type=
"button"
value=
"Release nodes"
value=
"Release nodes"
onclick=
"releaseNodes()"
/>
onclick=
"releaseNodes()"
/>
</div>
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
// Path to DOT file
// Path to DOT file
var
path
=
'%% DOT_FILE %%'
;
var
path
=
'%% DOT_FILE %%'
;
// '%% DOT_FILE %%';
// Backend graph in DOT format
// Backend graph in DOT format
var
dotGraph
;
var
dotGraph
;
// Frontend graph for visualization
// Frontend graph for visualization
...
...
theano/d3viz/js/d3viz.js
浏览文件 @
93fd1955
...
@@ -424,13 +424,13 @@ function drawConvexHull(d) {
...
@@ -424,13 +424,13 @@ function drawConvexHull(d) {
* Positions will be updated by updateGraph().
* Positions will be updated by updateGraph().
*/
*/
function
drawGraph
()
{
function
drawGraph
()
{
d3
.
select
(
'body'
).
select
(
'#menu'
).
select
(
'#toggleColors'
).
remove
();
if
(
isProfiled
)
{
if
(
isProfiled
)
{
d3
.
select
(
'body'
).
select
(
'#menu'
).
append
(
'input'
)
d3
.
select
(
'body'
).
select
(
'#menu'
).
append
(
'input'
)
.
attr
(
'
name'
,
't
Colors'
)
.
attr
(
'
id'
,
'toggle
Colors'
)
.
attr
(
'type'
,
'button'
)
.
attr
(
'type'
,
'button'
)
.
attr
(
'value'
,
'Toggle profile colors'
)
.
attr
(
'value'
,
'Toggle profile colors'
)
.
attr
(
'onclick'
,
"toggleNodeColors()"
);
.
attr
(
'onclick'
,
"toggleNodeColors()"
);
maxProfilePer
=
0
;
maxProfilePer
=
0
;
for
(
i
in
graph
.
nodes
)
{
for
(
i
in
graph
.
nodes
)
{
var
p
=
graph
.
nodes
[
i
].
value
.
profile
;
var
p
=
graph
.
nodes
[
i
].
value
.
profile
;
...
@@ -601,11 +601,9 @@ function drawGraph() {
...
@@ -601,11 +601,9 @@ function drawGraph() {
.
nodes
(
graph
.
nodes
)
.
nodes
(
graph
.
nodes
)
.
links
(
graph
.
edges
)
.
links
(
graph
.
edges
)
.
size
(
graph
.
size
)
.
size
(
graph
.
size
)
.
linkDistance
(
function
(
d
)
{
.
linkDistance
(
200
)
return
300
;
.
charge
(
-
1000
)
})
.
linkStrength
(
0.2
)
.
charge
(
-
600
)
.
linkStrength
(
1
)
.
gravity
(
0.05
)
.
gravity
(
0.05
)
.
friction
(
0.5
)
.
friction
(
0.5
)
.
on
(
'tick'
,
updateGraph
)
.
on
(
'tick'
,
updateGraph
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论