Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
404ec250
提交
404ec250
authored
5月 03, 2015
作者:
David Warde-Farley
提交者:
Arnaud Bergeron
6月 22, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Auto-fix filter()s.
Fix name clash caused by shadowed filter().
上级
1e457cc6
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
10 行增加
和
11 行删除
+10
-11
setup.py
setup.py
+1
-1
equilibrium.py
theano/gof/sandbox/equilibrium.py
+1
-1
utils.py
theano/gof/utils.py
+1
-1
ifelse.py
theano/ifelse.py
+1
-1
check_whitespace.py
theano/misc/hooks/check_whitespace.py
+1
-1
scan.py
theano/sandbox/scan.py
+1
-2
symbolic_module.py
theano/sandbox/symbolic_module.py
+1
-1
scan_utils.py
theano/scan_module/scan_utils.py
+3
-3
没有找到文件。
setup.py
浏览文件 @
404ec250
...
...
@@ -59,7 +59,7 @@ LONG_DESCRIPTION = (codecs.open("DESCRIPTION.txt",encoding='utf-8').read() +
URL
=
"http://deeplearning.net/software/theano/"
DOWNLOAD_URL
=
""
LICENSE
=
'BSD'
CLASSIFIERS
=
filter
(
None
,
CLASSIFIERS
.
split
(
'
\n
'
))
CLASSIFIERS
=
[
_f
for
_f
in
CLASSIFIERS
.
split
(
'
\n
'
)
if
_f
]
AUTHOR
=
"LISA laboratory, University of Montreal"
AUTHOR_EMAIL
=
"theano-dev@googlegroups.com"
PLATFORMS
=
[
"Windows"
,
"Linux"
,
"Solaris"
,
"Mac OS-X"
,
"Unix"
]
...
...
theano/gof/sandbox/equilibrium.py
浏览文件 @
404ec250
...
...
@@ -62,7 +62,7 @@ if 0:
nodes
=
[
node
]
while
candidates
:
for
node
in
nodes
:
candidates
=
filter
(
node
,
depth
)
candidates
=
list
(
filter
(
node
,
depth
)
)
depth
+=
1
_nodes
=
nodes
nodes
=
reduce
(
list
.
__iadd__
,
...
...
theano/gof/utils.py
浏览文件 @
404ec250
...
...
@@ -432,4 +432,4 @@ def remove(predicate, coll):
>>> remove(even, [1, 2, 3, 4])
[1, 3]
"""
return
filter
(
lambda
x
:
not
predicate
(
x
),
coll
)
return
[
x
for
x
in
coll
if
not
predicate
(
x
)]
theano/ifelse.py
浏览文件 @
404ec250
...
...
@@ -556,7 +556,7 @@ class CondMerge(gof.Optimizer):
def
apply
(
self
,
fgraph
):
nodelist
=
list
(
fgraph
.
toposort
())
cond_nodes
=
filter
(
lambda
s
:
isinstance
(
s
.
op
,
IfElse
),
nodelist
)
cond_nodes
=
[
s
for
s
in
nodelist
if
isinstance
(
s
.
op
,
IfElse
)]
if
len
(
cond_nodes
)
<
2
:
return
False
merging_node
=
cond_nodes
[
0
]
...
...
theano/misc/hooks/check_whitespace.py
浏览文件 @
404ec250
...
...
@@ -120,7 +120,7 @@ def run_mercurial_command(hg_command):
def
parse_stdout_filelist
(
hg_out_filelist
):
files
=
hg_out_filelist
.
split
()
files
=
[
f
.
strip
(
string
.
whitespace
+
"'"
)
for
f
in
files
]
files
=
filter
(
operator
.
truth
,
files
)
# get rid of empty entries
files
=
list
(
filter
(
operator
.
truth
,
files
)
)
# get rid of empty entries
return
files
...
...
theano/sandbox/scan.py
浏览文件 @
404ec250
...
...
@@ -464,8 +464,7 @@ def scan(fn,
not
isinstance
(
x
,
SharedVariable
)
and
not
isinstance
(
x
,
gof
.
Constant
)),
gof
.
graph
.
inputs
(
fake_outputs
))
extra_inputs
=
filter
(
lambda
x
:
x
not
in
args
+
fake_nonseqs
,
all_inputs
)
extra_inputs
=
[
x
for
x
in
all_inputs
if
x
not
in
args
+
fake_nonseqs
]
non_seqs
+=
extra_inputs
# Note we do not use all_inputs directly since the order of variables
# in args is quite important
...
...
theano/sandbox/symbolic_module.py
浏览文件 @
404ec250
...
...
@@ -27,7 +27,7 @@ class InitGraph(type):
return
isinstance
(
v
,
theano
.
Variable
)
and
not
k
.
startswith
(
'_'
)
r
=
{}
for
key
,
val
in
dct
.
items
():
if
filter
(
key
,
val
):
if
list
(
filter
(
key
,
val
)
):
r
[
key
]
=
val
return
r
build_graph_rval
=
cls
.
build_graph
()
...
...
theano/scan_module/scan_utils.py
浏览文件 @
404ec250
...
...
@@ -290,7 +290,7 @@ def get_updates_and_outputs(ls):
else
:
return
[
x
]
def
filter
(
x
):
def
_
filter
(
x
):
"""
Ensure `x` is made only of allowed data types.
...
...
@@ -304,12 +304,12 @@ def get_updates_and_outputs(ls):
elif
isinstance
(
x
,
dict
):
iter_on
=
x
.
iteritems
()
if
iter_on
is
not
None
:
return
all
(
filter
(
y
)
for
y
in
iter_on
)
return
all
(
_
filter
(
y
)
for
y
in
iter_on
)
else
:
return
(
isinstance
(
x
,
theano
.
Variable
)
or
isinstance
(
x
,
theano
.
scan_module
.
until
))
if
not
filter
(
ls
):
if
not
_
filter
(
ls
):
raise
ValueError
(
'The return value of your scan lambda expression may only be '
'made of lists, tuples, or dictionaries containing Theano '
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论