Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5b150c63
提交
5b150c63
authored
2月 23, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't catch interrupt.
上级
e6e229ef
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
25 行增加
和
25 行删除
+25
-25
env.py
theano/gof/env.py
+1
-1
test_optdb.py
theano/gof/tests/test_optdb.py
+3
-3
test_scan.py
theano/sandbox/scan_module/tests/test_scan.py
+2
-2
test_nnet.py
theano/tensor/nnet/tests/test_nnet.py
+17
-17
sharedvar.py
theano/tensor/sharedvar.py
+2
-2
没有找到文件。
theano/gof/env.py
浏览文件 @
5b150c63
...
...
@@ -443,7 +443,7 @@ class Env(utils.object2):
"""
try
:
self
.
_features
.
remove
(
feature
)
except
:
except
Exception
:
return
detach
=
getattr
(
feature
,
'on_detach'
,
None
)
if
detach
is
not
None
:
...
...
theano/gof/tests/test_optdb.py
浏览文件 @
5b150c63
...
...
@@ -23,7 +23,7 @@ class Test_DB(TestCase):
pass
else
:
raise
except
:
except
Exception
:
self
.
fail
()
try
:
...
...
@@ -34,7 +34,7 @@ class Test_DB(TestCase):
pass
else
:
raise
except
:
except
Exception
:
self
.
fail
()
try
:
...
...
@@ -45,7 +45,7 @@ class Test_DB(TestCase):
pass
else
:
raise
except
:
except
Exception
:
self
.
fail
()
theano/sandbox/scan_module/tests/test_scan.py
浏览文件 @
5b150c63
...
...
@@ -299,13 +299,13 @@ class TestScan(unittest.TestCase):
for
th_out
,
num_out
in
zip
(
theano_outs
,
numpy_outs
):
try
:
assert
numpy
.
allclose
(
th_out
,
num_out
)
except
:
except
Exception
:
#import ipdb; ipdb.set_trace()
raise
for
th_out
,
num_out
in
zip
(
shared_vars
,
numpy_shared
):
try
:
assert
numpy
.
allclose
(
th_out
.
get_value
(),
num_out
)
except
:
except
Exception
:
#import ipdb; ipdb.set_trace()
raise
# Scenario 2 : Loose fit (sequences longer then required)
...
...
theano/tensor/nnet/tests/test_nnet.py
浏览文件 @
5b150c63
...
...
@@ -496,7 +496,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
try
:
assert
len
(
f
.
maker
.
env
.
toposort
())
==
4
f
(
x_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
f
)
raise
...
...
@@ -507,7 +507,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
try
:
assert
len
(
g
.
maker
.
env
.
toposort
())
==
4
g
(
x_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
g
)
raise
...
...
@@ -525,7 +525,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
try
:
assert
len
(
f
.
maker
.
env
.
toposort
())
==
2
# [big_op, sum]
f
(
x_val
,
b_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
f
)
raise
...
...
@@ -535,7 +535,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
try
:
assert
len
(
g
.
maker
.
env
.
toposort
())
==
4
g
(
x_val
,
b_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
g
)
raise
...
...
@@ -553,7 +553,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
try
:
assert
len
(
f
.
maker
.
env
.
toposort
())
==
6
f
(
x_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
f
)
raise
...
...
@@ -564,7 +564,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
assert
len
(
g
.
maker
.
env
.
toposort
())
in
(
6
,
7
)
#there's an extra dimshuffle in there
# but I can't think of a good rule to get rid of it
g
(
x_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
g
)
raise
...
...
@@ -580,7 +580,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
theano
.
printing
.
debugprint
(
f
)
try
:
assert
len
(
f
.
maker
.
env
.
toposort
())
==
4
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
f
)
raise
...
...
@@ -590,7 +590,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
try
:
assert
len
(
g
.
maker
.
env
.
toposort
())
in
(
6
,
7
)
g
(
x_val
,
b_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
g
)
raise
...
...
@@ -624,7 +624,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
try
:
assert
len
(
f
.
maker
.
env
.
toposort
())
==
5
f
(
x_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
f
)
raise
...
...
@@ -635,7 +635,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
try
:
assert
len
(
g
.
maker
.
env
.
toposort
())
==
5
g
(
x_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
g
)
raise
...
...
@@ -671,7 +671,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
prev
,
last
=
f
.
maker
.
env
.
toposort
()[
-
2
:]
assert
len
(
f
.
maker
.
env
.
toposort
())
==
5
f
(
x_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
f
)
raise
...
...
@@ -684,7 +684,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
assert
softmax
in
ops
assert
softmax_grad
not
in
ops
g
(
x_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
g
)
raise
...
...
@@ -723,7 +723,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
prev
,
last
=
f
.
maker
.
env
.
toposort
()[
-
2
:]
assert
len
(
f
.
maker
.
env
.
toposort
())
==
3
# [big_op, sum, dim_shuffle]
f
(
x_val
,
b_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
f
)
raise
...
...
@@ -742,7 +742,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
assert
softmax_with_bias
in
ops
assert
softmax_grad
not
in
ops
g
(
x_val
,
b_val
,
y_val
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
g
)
raise
...
...
@@ -831,7 +831,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
assert
5
<=
len
(
f
.
maker
.
env
.
toposort
())
<=
10
validate_fn_graph
(
f
)
f
(
x_val
,
y_val
,
0.1
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
f
)
raise
...
...
@@ -841,7 +841,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
assert
5
<=
len
(
g
.
maker
.
env
.
toposort
())
<=
12
validate_grad_graph
(
g
)
g
(
x_val
,
y_val
,
0.1
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
g
)
raise
...
...
@@ -851,7 +851,7 @@ class T_CrossentropyCategorical1Hot(unittest.TestCase):
assert
8
<=
len
(
h
.
maker
.
env
.
toposort
())
<=
17
validate_grad_graph
(
h
)
h
(
x_val
,
y_val
,
0.1
)
except
:
except
Exception
:
theano
.
printing
.
debugprint
(
h
)
raise
...
...
theano/tensor/sharedvar.py
浏览文件 @
5b150c63
...
...
@@ -61,7 +61,7 @@ def scalar_constructor(value, name=None, strict=False, allow_downcast=None):
raise
TypeError
()
try
:
dtype
=
value
.
dtype
except
:
except
Exception
:
dtype
=
numpy
.
asarray
(
value
)
.
dtype
dtype
=
str
(
dtype
)
...
...
@@ -75,6 +75,6 @@ def scalar_constructor(value, name=None, strict=False, allow_downcast=None):
value
=
numpy
.
array
(
value
,
copy
=
True
),
name
=
name
,
strict
=
strict
,
allow_downcast
=
allow_downcast
)
return
rval
except
:
except
Exception
:
traceback
.
print_exc
()
raise
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论