Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
99cffe57
提交
99cffe57
authored
4月 19, 2016
作者:
Kelvin Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
passing tests
上级
ba81f75f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
6 行增加
和
4 行删除
+6
-4
extra_ops.py
theano/sandbox/cuda/extra_ops.py
+1
-1
test_extra_ops.py
theano/sandbox/cuda/tests/test_extra_ops.py
+1
-0
extra_ops.py
theano/sandbox/gpuarray/extra_ops.py
+0
-0
test_extra_ops.py
theano/sandbox/gpuarray/tests/test_extra_ops.py
+4
-3
没有找到文件。
theano/sandbox/cuda/extra_ops.py
浏览文件 @
99cffe57
...
@@ -43,7 +43,7 @@ class GpuCumsum(CumsumOp, GpuOp):
...
@@ -43,7 +43,7 @@ class GpuCumsum(CumsumOp, GpuOp):
if
x
.
ndim
>
GpuCumsum
.
SUPPORTED_NDIMS
:
if
x
.
ndim
>
GpuCumsum
.
SUPPORTED_NDIMS
:
raise
NotImplementedError
(
'Only cumsum on 1D, 2D and 3D array are supported right now!'
)
raise
NotImplementedError
(
'Only cumsum on 1D, 2D and 3D array are supported right now!'
)
print
(
self
.
axis
)
if
self
.
axis
>=
x
.
ndim
or
self
.
axis
<
-
x
.
ndim
:
if
self
.
axis
>=
x
.
ndim
or
self
.
axis
<
-
x
.
ndim
:
raise
ValueError
(
'axis(={1}) out of bounds'
.
format
(
self
.
axis
))
raise
ValueError
(
'axis(={1}) out of bounds'
.
format
(
self
.
axis
))
...
...
theano/sandbox/cuda/tests/test_extra_ops.py
浏览文件 @
99cffe57
...
@@ -53,6 +53,7 @@ class TestGpuCumsum(theano.tensor.tests.test_extra_ops.TestCumsumOp):
...
@@ -53,6 +53,7 @@ class TestGpuCumsum(theano.tensor.tests.test_extra_ops.TestCumsumOp):
a
=
np
.
random
.
random
((
42
,))
.
astype
(
"float32"
)
a
=
np
.
random
.
random
((
42
,))
.
astype
(
"float32"
)
cumsum_function
=
theano
.
function
([
x
],
cumsum
(
x
,
axis
=
axis
),
cumsum_function
=
theano
.
function
([
x
],
cumsum
(
x
,
axis
=
axis
),
mode
=
self
.
mode
)
mode
=
self
.
mode
)
theano
.
printing
.
debugprint
(
cumsum_function
)
slicings
=
[
slice
(
None
,
None
,
None
),
# Normal strides
slicings
=
[
slice
(
None
,
None
,
None
),
# Normal strides
slice
(
None
,
None
,
2
),
# Stepped strides
slice
(
None
,
None
,
2
),
# Stepped strides
...
...
theano/sandbox/gpuarray/extra_ops.py
浏览文件 @
99cffe57
差异被折叠。
点击展开。
theano/sandbox/gpuarray/tests/test_extra_ops.py
浏览文件 @
99cffe57
...
@@ -12,7 +12,7 @@ import theano.tensor.tests.test_extra_ops
...
@@ -12,7 +12,7 @@ import theano.tensor.tests.test_extra_ops
from
theano.tensor.extra_ops
import
cumsum
,
CumsumOp
from
theano.tensor.extra_ops
import
cumsum
,
CumsumOp
from
theano.tests
import
unittest_tools
as
utt
from
theano.tests
import
unittest_tools
as
utt
from
.config
import
mode_with_gpu
,
test_ctx_name
,
test_ctx
from
.config
import
mode_with_gpu
,
test_ctx_name
from
..extra_ops
import
GpuCumsum
from
..extra_ops
import
GpuCumsum
from
..type
import
get_context
from
..type
import
get_context
...
@@ -22,10 +22,11 @@ class TestGpuCumsum(theano.tensor.tests.test_extra_ops.TestCumsumOp):
...
@@ -22,10 +22,11 @@ class TestGpuCumsum(theano.tensor.tests.test_extra_ops.TestCumsumOp):
def
setUp
(
self
):
def
setUp
(
self
):
super
(
TestGpuCumsum
,
self
)
.
setUp
()
super
(
TestGpuCumsum
,
self
)
.
setUp
()
if
get_context
(
test_ctx_name
)
.
kind
!=
'cuda'
:
test_ctx
=
get_context
(
test_ctx_name
)
if
test_ctx
.
kind
!=
'cuda'
:
raise
SkipTest
(
"Cuda specific tests"
)
raise
SkipTest
(
"Cuda specific tests"
)
self
.
max_threads_dim0
=
test_ctx
.
maxlsize0
self
.
max_threads_dim0
=
test_ctx
.
maxlsize0
self
.
max_grid_size1
=
test_ctx
.
maxgsize
1
self
.
max_grid_size1
=
test_ctx
.
maxgsize
2
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论