Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
bbb8e009
提交
bbb8e009
authored
10月 21, 2020
作者:
Brandon T. Willard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Apply pyupgrade to tests.compile
上级
8caceba6
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
5 行增加
和
6 行删除
+5
-6
test_debugmode.py
tests/compile/test_debugmode.py
+1
-2
test_function_module.py
tests/compile/test_function_module.py
+2
-2
test_misc.py
tests/compile/test_misc.py
+2
-2
没有找到文件。
tests/compile/test_debugmode.py
浏览文件 @
bbb8e009
...
@@ -2,7 +2,6 @@ import sys
...
@@ -2,7 +2,6 @@ import sys
import
numpy
as
np
import
numpy
as
np
import
pytest
import
pytest
from
six
import
reraise
import
theano
import
theano
import
theano.tensor
import
theano.tensor
...
@@ -301,7 +300,7 @@ def test_badoptimization_opt_err():
...
@@ -301,7 +300,7 @@ def test_badoptimization_opt_err():
new_e
=
e
.
__class__
(
"TTT"
+
str
(
e
))
new_e
=
e
.
__class__
(
"TTT"
+
str
(
e
))
exc_type
,
exc_value
,
exc_trace
=
sys
.
exc_info
()
exc_type
,
exc_value
,
exc_trace
=
sys
.
exc_info
()
exc_value
=
new_e
exc_value
=
new_e
r
eraise
(
e
.
__class__
,
exc_value
,
exc_trace
)
r
aise
exc_value
.
with_traceback
(
exc_trace
)
def
test_stochasticoptimization
():
def
test_stochasticoptimization
():
...
...
tests/compile/test_function_module.py
浏览文件 @
bbb8e009
...
@@ -251,7 +251,7 @@ class TestFunction:
...
@@ -251,7 +251,7 @@ class TestFunction:
def
t
():
def
t
():
f
=
function
(
f
=
function
(
[
[
In
(
a
,
name
=
set
([
"adsf"
,
()])
,
value
=
1.0
),
In
(
a
,
name
=
{
"adsf"
,
()}
,
value
=
1.0
),
In
(
x
,
name
=
(),
value
=
2.0
),
In
(
x
,
name
=
(),
value
=
2.0
),
In
(
s
,
name
=
tt
.
scalar
(),
value
=
3.0
),
In
(
s
,
name
=
tt
.
scalar
(),
value
=
3.0
),
],
],
...
@@ -1091,7 +1091,7 @@ class TestPicklefunction:
...
@@ -1091,7 +1091,7 @@ class TestPicklefunction:
assert
blah
.
f1
[
blah
.
s
]
!=
blah2
.
f1
[
blah2
.
s
]
assert
blah
.
f1
[
blah
.
s
]
!=
blah2
.
f1
[
blah2
.
s
]
class
SomethingToPickle
(
object
)
:
class
SomethingToPickle
:
def
__init__
(
self
):
def
__init__
(
self
):
a
=
tt
.
scalar
()
# the a is for 'anonymous' (un-named).
a
=
tt
.
scalar
()
# the a is for 'anonymous' (un-named).
x
,
s
=
tt
.
scalars
(
"xs"
)
x
,
s
=
tt
.
scalars
(
"xs"
)
...
...
tests/compile/test_misc.py
浏览文件 @
bbb8e009
...
@@ -6,7 +6,7 @@ from theano.compile.sharedvalue import shared
...
@@ -6,7 +6,7 @@ from theano.compile.sharedvalue import shared
from
theano.tensor.nnet
import
sigmoid
from
theano.tensor.nnet
import
sigmoid
class
NNet
(
object
)
:
class
NNet
:
def
__init__
(
def
__init__
(
self
,
self
,
input
=
None
,
input
=
None
,
...
@@ -17,7 +17,7 @@ class NNet(object):
...
@@ -17,7 +17,7 @@ class NNet(object):
lr
=
1e-3
,
lr
=
1e-3
,
**
kw
,
**
kw
,
):
):
super
(
NNet
,
self
)
.
__init__
(
**
kw
)
super
()
.
__init__
(
**
kw
)
if
input
is
None
:
if
input
is
None
:
input
=
tensor
.
dvector
(
"input"
)
input
=
tensor
.
dvector
(
"input"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论