Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
0babc678
提交
0babc678
authored
3月 08, 2016
作者:
Frédéric Bastien
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4168 from abergeron/fix_cgemv_nan
Fix nan handling in output buffer for CGemv
上级
b4bec9a3
38e12a57
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
2 行删除
+17
-2
blas_c.py
theano/tensor/blas_c.py
+0
-0
test_abstract_conv.py
theano/tensor/nnet/tests/test_abstract_conv.py
+5
-0
test_blas_c.py
theano/tensor/tests/test_blas_c.py
+12
-2
没有找到文件。
theano/tensor/blas_c.py
浏览文件 @
0babc678
差异被折叠。
点击展开。
theano/tensor/nnet/tests/test_abstract_conv.py
浏览文件 @
0babc678
...
@@ -294,6 +294,11 @@ class TestCpuConv2d(BaseTestConv2d):
...
@@ -294,6 +294,11 @@ class TestCpuConv2d(BaseTestConv2d):
def
setUp
(
self
):
def
setUp
(
self
):
super
(
TestCpuConv2d
,
self
)
.
setUp
()
super
(
TestCpuConv2d
,
self
)
.
setUp
()
self
.
mode
=
theano
.
compile
.
mode
.
get_default_mode
()
.
excluding
(
'conv_gemm'
)
self
.
mode
=
theano
.
compile
.
mode
.
get_default_mode
()
.
excluding
(
'conv_gemm'
)
self
.
opt_err
=
theano
.
config
.
on_opt_error
theano
.
config
.
on_opt_error
=
'ignore'
def
tearDown
(
self
):
theano
.
config
.
on_opt_error
=
self
.
opt_err
def
tcase
(
self
,
i
,
f
,
s
,
b
,
flip
,
provide_shape
):
def
tcase
(
self
,
i
,
f
,
s
,
b
,
flip
,
provide_shape
):
mode
=
self
.
mode
mode
=
self
.
mode
...
...
theano/tensor/tests/test_blas_c.py
浏览文件 @
0babc678
...
@@ -130,6 +130,16 @@ class TestCGemv(TestCase, TestOptimizationMixin):
...
@@ -130,6 +130,16 @@ class TestCGemv(TestCase, TestOptimizationMixin):
# scalar
# scalar
self
.
a
=
tensor
.
tensor
(
dtype
=
dtype
,
broadcastable
=
())
self
.
a
=
tensor
.
tensor
(
dtype
=
dtype
,
broadcastable
=
())
def
test_nan_beta_0
(
self
):
f
=
theano
.
function
([
self
.
A
,
self
.
x
,
self
.
y
,
self
.
a
],
self
.
a
*
self
.
y
+
theano
.
dot
(
self
.
A
,
self
.
x
),
mode
=
self
.
mode
)
Aval
=
numpy
.
ones
((
3
,
1
),
dtype
=
self
.
dtype
)
xval
=
numpy
.
ones
((
1
,),
dtype
=
self
.
dtype
)
yval
=
float
(
'NaN'
)
*
numpy
.
ones
((
3
,),
dtype
=
self
.
dtype
)
zval
=
f
(
Aval
,
xval
,
yval
,
0
)
assert
not
numpy
.
isnan
(
zval
)
.
any
()
def
test_optimizations_vm
(
self
):
def
test_optimizations_vm
(
self
):
''' Test vector dot matrix '''
''' Test vector dot matrix '''
f
=
theano
.
function
([
self
.
x
,
self
.
A
],
f
=
theano
.
function
([
self
.
x
,
self
.
A
],
...
@@ -140,7 +150,7 @@ class TestCGemv(TestCase, TestOptimizationMixin):
...
@@ -140,7 +150,7 @@ class TestCGemv(TestCase, TestOptimizationMixin):
self
.
assertFunctionContains0
(
f
,
tensor
.
dot
)
self
.
assertFunctionContains0
(
f
,
tensor
.
dot
)
self
.
assertFunctionContains1
(
self
.
assertFunctionContains1
(
f
,
f
,
CGemv
(
inplace
=
True
,
force_init_beta
=
True
)
CGemv
(
inplace
=
True
)
)
)
# Assert they produce the same output
# Assert they produce the same output
...
@@ -161,7 +171,7 @@ class TestCGemv(TestCase, TestOptimizationMixin):
...
@@ -161,7 +171,7 @@ class TestCGemv(TestCase, TestOptimizationMixin):
self
.
assertFunctionContains0
(
f
,
tensor
.
dot
)
self
.
assertFunctionContains0
(
f
,
tensor
.
dot
)
self
.
assertFunctionContains1
(
self
.
assertFunctionContains1
(
f
,
f
,
CGemv
(
inplace
=
True
,
force_init_beta
=
True
)
CGemv
(
inplace
=
True
)
)
)
# Assert they produce the same output
# Assert they produce the same output
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论