Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
31ac6dc7
提交
31ac6dc7
authored
2月 03, 2022
作者:
Brandon T. Willard
提交者:
Brandon T. Willard
2月 22, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update Scan test method names
上级
321c0108
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
7 行增加
和
4 行删除
+7
-4
test_basic.py
tests/scan/test_basic.py
+7
-4
没有找到文件。
tests/scan/test_basic.py
浏览文件 @
31ac6dc7
...
...
@@ -1858,6 +1858,9 @@ class TestScan:
def
test_grad_multiple_outs_some_disconnected_2
(
self
):
# This is to try the network in DEBUG_MODE, but not fully
# train it since that would take 3 hours
# TODO FIXME: This won't work in debug mode due to an `Elemwise` bug.
# with config.change_flags(mode="DebugMode"):
self
.
_grad_mout_helper
(
1
,
None
)
def
_grad_mout_helper
(
self
,
n_iters
,
mode
):
...
...
@@ -1933,7 +1936,7 @@ class TestScan:
# pred = eval_rnn_fn(s_v)
return
cost
def
test_
draw
_as_input_to_scan
(
self
):
def
test_
random
_as_input_to_scan
(
self
):
trng
=
RandomStream
(
123
)
x
=
matrix
(
"x"
)
...
...
@@ -1951,7 +1954,7 @@ class TestScan:
utt
.
assert_allclose
([
ny2
,
ny2
],
nz2
)
assert
not
np
.
allclose
(
ny1
,
ny2
)
def
test_grad_
of
_shared
(
self
):
def
test_grad_
wrt
_shared
(
self
):
x1
=
shared
(
3.0
)
x1
.
name
=
"x1"
x2
=
vector
(
"x2"
)
...
...
@@ -1961,7 +1964,7 @@ class TestScan:
f
=
function
([
x2
],
m
,
allow_input_downcast
=
True
)
utt
.
assert_allclose
(
f
([
2
,
3
]),
5
)
def
test_
computing_gradient
(
self
):
def
test_
inner_grad_wrt_shared
(
self
):
x1
=
scalar
(
"x1"
)
x2
=
shared
(
np
.
array
([
1
,
2
,
3
,
4
,
5
]),
name
=
"x2"
)
K
=
x2
*
x1
...
...
@@ -1990,7 +1993,7 @@ class TestScan:
f
()
assert
X
.
get_value
()
==
11
def
test_memory_aliasing_updates
(
self
):
def
test_
shared_
memory_aliasing_updates
(
self
):
x
=
shared
(
np
.
array
(
1
))
y
=
shared
(
np
.
array
(
1
))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论