Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
2ac4b4ca
提交
2ac4b4ca
authored
2月 16, 2012
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor strides tests to also run on CPU
And it seems a good idea, since several are failing...
上级
5ba4af1e
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
17 行增加
和
4 行删除
+17
-4
test_blas.py
theano/sandbox/cuda/tests/test_blas.py
+6
-1
test_blas.py
theano/tensor/tests/test_blas.py
+0
-0
test_blas_c.py
theano/tensor/tests/test_blas_c.py
+6
-2
test_blas_scipy.py
theano/tensor/tests/test_blas_scipy.py
+5
-1
没有找到文件。
theano/sandbox/cuda/tests/test_blas.py
浏览文件 @
2ac4b4ca
...
...
@@ -18,7 +18,7 @@ import theano.sandbox.cuda as tcn
from
theano.tensor.signal.downsample
import
DownsampleFactorMax
,
DownsampleFactorMaxGrad
import
theano.compile.mode
from
theano.tensor.tests.test_blas
import
BaseGemv
,
TestGer
from
theano.tensor.tests.test_blas
import
BaseGemv
,
Test
BlasStrides
,
Test
Ger
from
theano.sandbox.cuda.blas
import
gpu_gemv_no_inplace
,
gpu_gemv_inplace
from
theano.sandbox.cuda.blas
import
gpu_ger_inplace
,
gpu_ger_no_inplace
...
...
@@ -167,6 +167,11 @@ def test_gemm_no_inplace():
cmp
((
0
,
0
),(
0
,
0
))
class
TestBlasStridesGpu
(
TestBlasStrides
):
dtype
=
'float32'
shared
=
staticmethod
(
tcn
.
shared_constructor
)
mode
=
mode_with_gpu
def
test_dot22_strides
():
def
cmp
(
b_shp
,
c_shp
):
av
=
numpy
.
zeros
((
0
,
0
),
dtype
=
'float32'
)
...
...
theano/tensor/tests/test_blas.py
浏览文件 @
2ac4b4ca
差异被折叠。
点击展开。
theano/tensor/tests/test_blas_c.py
浏览文件 @
2ac4b4ca
import
sys
import
numpy
from
unittest
import
TestCase
import
theano
import
theano.tensor
as
tensor
...
...
@@ -14,8 +16,7 @@ from theano.tensor.blas import Gemv
from
theano.tests
import
unittest_tools
from
theano.tests.unittest_tools
import
TestOptimizationMixin
from
test_blas
import
TestCase
from
test_blas
import
BaseGemv
from
theano.tensor.tests.test_blas
import
BaseGemv
,
TestBlasStrides
mode_blas_opt
=
theano
.
compile
.
get_default_mode
()
.
including
(
'BlasOpt'
,
'specialize'
,
'InplaceBlasOpt'
,
'c_blas'
)
...
...
@@ -238,3 +239,6 @@ class TestCGemvFloat64(TestCase, BaseGemv, TestOptimizationMixin):
dtype
=
'float64'
gemv
=
CGemv
(
inplace
=
False
)
gemv_inplace
=
CGemv
(
inplace
=
True
)
class
TestBlasStridesC
(
TestBlasStrides
):
mode
=
mode_blas_opt
theano/tensor/tests/test_blas_scipy.py
浏览文件 @
2ac4b4ca
...
...
@@ -4,7 +4,7 @@ import theano
import
theano.tensor
as
tensor
from
theano.tensor.blas_scipy
import
ScipyGer
from
test_blas
import
TestCase
,
gemm_no_inplace
from
test_blas
import
TestCase
,
gemm_no_inplace
,
TestBlasStrides
from
theano.tests.unittest_tools
import
TestOptimizationMixin
class
TestScipyGer
(
TestCase
,
TestOptimizationMixin
):
...
...
@@ -56,3 +56,7 @@ class TestScipyGer(TestCase, TestOptimizationMixin):
0.2
*
self
.
A
+
0.1
*
tensor
.
outer
(
self
.
x
,
self
.
y
))
self
.
assertFunctionContains
(
f
,
gemm_no_inplace
)
self
.
run_f
(
f
)
#DebugMode tests correctness
class
TestBlasStridesScipy
(
TestBlasStrides
):
mode
=
theano
.
compile
.
get_default_mode
()
mode
=
mode
.
including
(
'fast_run'
)
.
excluding
(
'gpu'
,
'c_blas'
)
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论