Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3e4c6b97
提交
3e4c6b97
authored
9月 20, 2016
作者:
Gijs van Tulder
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove cast_to_output_type=False (the default).
上级
eaf8e909
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
25 行删除
+8
-25
test_dnn.py
theano/gpuarray/tests/test_dnn.py
+5
-15
test_dnn.py
theano/sandbox/cuda/tests/test_dnn.py
+3
-10
没有找到文件。
theano/gpuarray/tests/test_dnn.py
浏览文件 @
3e4c6b97
...
@@ -258,9 +258,7 @@ def test_pooling():
...
@@ -258,9 +258,7 @@ def test_pooling():
def
fn
(
x
):
def
fn
(
x
):
return
pool_2d
(
x
,
(
ws
,
ws
),
ignore_border
=
True
,
return
pool_2d
(
x
,
(
ws
,
ws
),
ignore_border
=
True
,
padding
=
pad
,
mode
=
mode
)
padding
=
pad
,
mode
=
mode
)
utt
.
verify_grad
(
fn
,
[
data
],
utt
.
verify_grad
(
fn
,
[
data
],
mode
=
mode_with_gpu
)
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
# Confirm that the opt would have inserted it.
# Confirm that the opt would have inserted it.
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
mode
=
mode_with_gpu
)
mode
=
mode_with_gpu
)
...
@@ -275,9 +273,7 @@ def test_pooling():
...
@@ -275,9 +273,7 @@ def test_pooling():
pad
=
pad
,
pad
=
pad
,
mode
=
mode
)
mode
=
mode
)
return
dnn_op
return
dnn_op
utt
.
verify_grad
(
fn
,
[
data
],
utt
.
verify_grad
(
fn
,
[
data
],
mode
=
mode_with_gpu
)
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
# Confirm that we get the good op.
# Confirm that we get the good op.
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
mode
=
mode_with_gpu
)
mode
=
mode_with_gpu
)
...
@@ -371,9 +367,7 @@ def test_pooling_3d():
...
@@ -371,9 +367,7 @@ def test_pooling_3d():
def
fn
(
x
):
def
fn
(
x
):
return
pool_3d
(
x
,
(
ws
,
ws
,
ws
),
ignore_border
=
True
,
return
pool_3d
(
x
,
(
ws
,
ws
,
ws
),
ignore_border
=
True
,
padding
=
pad
,
mode
=
mode
)
padding
=
pad
,
mode
=
mode
)
utt
.
verify_grad
(
fn
,
[
data
],
utt
.
verify_grad
(
fn
,
[
data
],
mode
=
mode_with_gpu
)
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
# Confirm that the opt would have inserted it.
# Confirm that the opt would have inserted it.
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
mode
=
mode_with_gpu
)
mode
=
mode_with_gpu
)
...
@@ -388,9 +382,7 @@ def test_pooling_3d():
...
@@ -388,9 +382,7 @@ def test_pooling_3d():
pad
=
pad
,
pad
=
pad
,
mode
=
mode
)
mode
=
mode
)
return
dnn_op
return
dnn_op
utt
.
verify_grad
(
fn
,
[
data
],
utt
.
verify_grad
(
fn
,
[
data
],
mode
=
mode_with_gpu
)
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
# Confirm that we get the good op.
# Confirm that we get the good op.
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
mode
=
mode_with_gpu
)
mode
=
mode_with_gpu
)
...
@@ -435,9 +427,7 @@ def test_pooling_with_tensor_vars():
...
@@ -435,9 +427,7 @@ def test_pooling_with_tensor_vars():
(
1
,
1
,
3
,
3
)]:
(
1
,
1
,
3
,
3
)]:
data
=
numpy
.
random
.
normal
(
0
,
1
,
shp
)
.
astype
(
"float32"
)
*
10
data
=
numpy
.
random
.
normal
(
0
,
1
,
shp
)
.
astype
(
"float32"
)
*
10
theano
.
tests
.
unittest_tools
.
verify_grad
(
theano
.
tests
.
unittest_tools
.
verify_grad
(
fn
,
[
data
],
fn
,
[
data
],
mode
=
mode_with_gpu
)
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
out2
=
pool_2d_i2n
(
x
,
ds
=
(
2
,
2
),
strides
=
(
1
,
1
),
out2
=
pool_2d_i2n
(
x
,
ds
=
(
2
,
2
),
strides
=
(
1
,
1
),
pad
=
(
0
,
0
),
pad
=
(
0
,
0
),
...
...
theano/sandbox/cuda/tests/test_dnn.py
浏览文件 @
3e4c6b97
...
@@ -295,7 +295,6 @@ def test_pooling():
...
@@ -295,7 +295,6 @@ def test_pooling():
return
pool_2d
(
x
,
(
ws
,
ws
),
ignore_border
=
True
,
return
pool_2d
(
x
,
(
ws
,
ws
),
ignore_border
=
True
,
padding
=
pad
,
mode
=
mode
)
padding
=
pad
,
mode
=
mode
)
theano
.
tests
.
unittest_tools
.
verify_grad
(
fn
,
[
data
],
theano
.
tests
.
unittest_tools
.
verify_grad
(
fn
,
[
data
],
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
mode
=
mode_with_gpu
)
# Confirm that the opt would have inserted it.
# Confirm that the opt would have inserted it.
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
...
@@ -312,9 +311,7 @@ def test_pooling():
...
@@ -312,9 +311,7 @@ def test_pooling():
mode
=
mode
)
mode
=
mode
)
return
dnn_op
return
dnn_op
theano
.
tests
.
unittest_tools
.
verify_grad
(
theano
.
tests
.
unittest_tools
.
verify_grad
(
fn
,
[
data
],
fn
,
[
data
],
mode
=
mode_with_gpu
)
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
# Confirm that we get the good op.
# Confirm that we get the good op.
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
mode
=
mode_with_gpu
)
mode
=
mode_with_gpu
)
...
@@ -359,9 +356,7 @@ def test_pooling_with_tensor_vars():
...
@@ -359,9 +356,7 @@ def test_pooling_with_tensor_vars():
(
1
,
1
,
3
,
3
)]:
(
1
,
1
,
3
,
3
)]:
data
=
numpy
.
random
.
normal
(
0
,
1
,
shp
)
.
astype
(
"float32"
)
*
10
data
=
numpy
.
random
.
normal
(
0
,
1
,
shp
)
.
astype
(
"float32"
)
*
10
theano
.
tests
.
unittest_tools
.
verify_grad
(
theano
.
tests
.
unittest_tools
.
verify_grad
(
fn
,
[
data
],
fn
,
[
data
],
mode
=
mode_with_gpu
)
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
mode_without_gpu2
=
mode_without_gpu
.
including
()
mode_without_gpu2
=
mode_without_gpu
.
including
()
mode_without_gpu2
.
check_isfinite
=
False
mode_without_gpu2
.
check_isfinite
=
False
...
@@ -496,9 +491,7 @@ def test_pooling3d():
...
@@ -496,9 +491,7 @@ def test_pooling3d():
mode
=
mode
)
mode
=
mode
)
return
dnn_op
return
dnn_op
theano
.
tests
.
unittest_tools
.
verify_grad
(
theano
.
tests
.
unittest_tools
.
verify_grad
(
fn
,
[
data
],
fn
,
[
data
],
mode
=
mode_with_gpu
)
cast_to_output_type
=
False
,
mode
=
mode_with_gpu
)
# Confirm that we get the good op.
# Confirm that we get the good op.
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
fg
=
theano
.
function
([
x
],
theano
.
grad
(
fn
(
x
)
.
sum
(),
x
),
mode
=
mode_with_gpu
)
mode
=
mode_with_gpu
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论