Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
cdc17115
提交
cdc17115
authored
9月 29, 2008
作者:
James Bergstra
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added typelist, comments to oplist
上级
d5e4d890
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
57 行增加
和
11 行删除
+57
-11
gen_oplist.py
gen_oplist.py
+25
-7
gen_typelist.py
gen_typelist.py
+27
-0
local.build_html.sh
local.build_html.sh
+4
-3
tensor.py
tensor.py
+1
-1
没有找到文件。
gen_oplist.py
浏览文件 @
cdc17115
...
@@ -3,11 +3,20 @@ __docformat__ = "restructuredtext en"
...
@@ -3,11 +3,20 @@ __docformat__ = "restructuredtext en"
import
sys
import
sys
import
gof
import
gof
def
print_title
(
title_string
,
under_char
):
def
print_title
(
title_string
,
under_char
,
over_char
=
''
):
l
=
len
(
title_string
)
if
over_char
:
print
over_char
*
l
print
title_string
print
title_string
print
under_char
*
len
(
title_string
)
if
under_char
:
print
under_char
*
l
print
""
print
""
def
print_hline
():
print
'-'
*
80
class
Entry
:
class
Entry
:
"""Structure for generating the oplist file"""
"""Structure for generating the oplist file"""
...
@@ -105,11 +114,6 @@ def search_entries(module_list):
...
@@ -105,11 +114,6 @@ def search_entries(module_list):
return
ops
,
constructors
return
ops
,
constructors
def
print_entries
(
ops
,
constructors
):
def
print_entries
(
ops
,
constructors
):
print_title
(
"Theano Op List"
,
"~"
)
print
""
print
".. contents:: "
print
""
tags
=
{}
tags
=
{}
for
o
in
ops
+
constructors
:
for
o
in
ops
+
constructors
:
for
t
in
o
.
tags
:
for
t
in
o
.
tags
:
...
@@ -139,5 +143,19 @@ if __name__ == "__main__":
...
@@ -139,5 +143,19 @@ if __name__ == "__main__":
"""Generate the op list"""
"""Generate the op list"""
import
scalar
,
sparse
,
tensor
import
scalar
,
sparse
,
tensor
print_title
(
"Op List"
,
"~"
,
"~"
)
print
"""
This page lists the `Op Classes` and `constructors` that are provided by the Theano library.
`Op Classes` drive from :api:`Op`, whereas `constructors` are typically `Op Class` instances, but may be true Python functions.
In the future, this list may distinguish `constructors` that are Op instances from true Python functions.
"""
print_hline
()
print
""
print
".. contents:: "
print
""
ops
,
constructors
=
search_entries
([
scalar
,
sparse
,
tensor
])
ops
,
constructors
=
search_entries
([
scalar
,
sparse
,
tensor
])
print_entries
(
ops
,
constructors
)
print_entries
(
ops
,
constructors
)
gen_typelist.py
0 → 100644
浏览文件 @
cdc17115
from
gen_oplist
import
print_title
,
print_hline
if
__name__
==
'__main__'
:
print_title
(
"Type List"
,
"~"
,
"~"
)
print
"*THIS PAGE IS A PLACEHOLDER: WRITEME *"
print
""
print_hline
()
print
""
print
".. contents::"
print
""
print_title
(
"Type Classes"
,
'='
)
print
"- scalar.Scalar
\n
"
print
"- tensor.Tensor
\n
"
print
"- sparse.Sparse
\n
"
print_title
(
"Type Instances"
,
'='
)
print
"- scalar.int8
\n
"
print
"- tensor.lvector
\n
"
print
"- sparse.??
\n
"
local.build_html.sh
浏览文件 @
cdc17115
...
@@ -24,20 +24,21 @@ if [ " $1" != " epydoc" ]; then
...
@@ -24,20 +24,21 @@ if [ " $1" != " epydoc" ]; then
#generate the index & readme files
#generate the index & readme files
echo
"
$APIRST2HTML
$EPYDOC_ARGS
index.txt html/index.html..."
echo
"
$APIRST2HTML
$EPYDOC_ARGS
index.txt html/index.html..."
$APIRST2HTML
$EPYDOC_ARGS
--stylesheet
=
style.css index.txt html/index.html
$APIRST2HTML
-stg
$EPYDOC_ARGS
--stylesheet
=
style.css index.txt html/index.html
echo
"
$APIRST2HTML
$EPYDOC_ARGS
README.txt html/README.html..."
echo
"
$APIRST2HTML
$EPYDOC_ARGS
README.txt html/README.html..."
$APIRST2HTML
$EPYDOC_ARGS
--stylesheet
=
style.css README.txt html/README.html
$APIRST2HTML
-stg
$EPYDOC_ARGS
--stylesheet
=
style.css README.txt html/README.html
#generate the oplist in ReST format
#generate the oplist in ReST format
echo
"gen oplist..."
echo
"gen oplist..."
python gen_oplist.py
>
doc/oplist.txt
python gen_oplist.py
>
doc/oplist.txt
python gen_typelist.py
>
doc/typelist.txt
#generate html files for all the ReST documents in doc/
#generate html files for all the ReST documents in doc/
echo
"gen doc/*.txt..."
echo
"gen doc/*.txt..."
for
RST
in
doc/
*
.txt
;
do
for
RST
in
doc/
*
.txt
;
do
BASENAME
=
$(
basename
$RST
.txt
)
BASENAME
=
$(
basename
$RST
.txt
)
echo
"gen doc/
$BASENAME
.txt..."
echo
"gen doc/
$BASENAME
.txt..."
$APIRST2HTML
$EPYDOC_ARGS
--stylesheet
=
../style.css doc/
$BASENAME
.txt html/doc/
$BASENAME
.html
$APIRST2HTML
-stg
$EPYDOC_ARGS
--stylesheet
=
../style.css doc/
$BASENAME
.txt html/doc/
$BASENAME
.html
done
done
fi
fi
tensor.py
浏览文件 @
cdc17115
...
@@ -1397,7 +1397,7 @@ class Split(Op):
...
@@ -1397,7 +1397,7 @@ class Split(Op):
raise
ValueError
(
'In Split.perform(), len(splits) != len_splits.'
,
raise
ValueError
(
'In Split.perform(), len(splits) != len_splits.'
,
(
len
(
splits
),
self
.
len_splits
))
(
len
(
splits
),
self
.
len_splits
))
# Checking is done, lets roll the splitting algorithm!
# Checking is done, let
'
s roll the splitting algorithm!
# Basically we step along the given axis of x, extracting subtensors of size splits[i]
# Basically we step along the given axis of x, extracting subtensors of size splits[i]
# as we go along.
# as we go along.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论