Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
0ace4aec
提交
0ace4aec
authored
8月 18, 2014
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't enable the GPU version of conv3d ops, as they aren't tested and bugged and VERY slow!
上级
015b42a4
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
11 行增加
和
8 行删除
+11
-8
GpuConv3D.py
theano/sandbox/cuda/GpuConv3D.py
+3
-2
GpuConvGrad3D.py
theano/sandbox/cuda/GpuConvGrad3D.py
+4
-3
GpuConvTransp3D.py
theano/sandbox/cuda/GpuConvTransp3D.py
+4
-3
没有找到文件。
theano/sandbox/cuda/GpuConv3D.py
浏览文件 @
0ace4aec
...
...
@@ -7,7 +7,7 @@ from theano.sandbox.cuda.basic_ops import (as_cuda_ndarray_variable,
host_from_gpu
,
HostFromGpu
)
from
theano.misc
import
strutil
from
theano.tensor.nnet.Conv3D
import
Conv3D
from
theano.sandbox.cuda.opt
import
register_opt
from
theano.sandbox.cuda.opt
import
gpu_optimizer
from
theano.sandbox.cuda
import
CudaNdarrayType
,
GpuOp
...
...
@@ -288,7 +288,6 @@ conv_rows_stack( float* img, float* kern, float* bias, float* out,
gpu_convd
=
GpuConv3D
()
@register_opt
()
@local_optimizer
([
Conv3D
])
def
local_gpu_conv3d
(
node
):
if
isinstance
(
node
.
op
,
Conv3D
):
...
...
@@ -300,3 +299,5 @@ def local_gpu_conv3d(node):
as_cuda_ndarray_variable
(
W
),
as_cuda_ndarray_variable
(
b
),
d
))]
# Not enabled by default as we don't want people to use it.
gpu_optimizer
.
register
(
"local_gpu_conv3d"
,
local_gpu_conv3d
)
theano/sandbox/cuda/GpuConvGrad3D.py
浏览文件 @
0ace4aec
...
...
@@ -7,7 +7,7 @@ from theano.sandbox.cuda.basic_ops import as_cuda_ndarray_variable
from
theano.misc
import
strutil
from
theano.tensor.nnet.ConvGrad3D
import
ConvGrad3D
from
theano.sandbox.cuda.opt
import
register_opt
from
theano.sandbox.cuda.opt
import
gpu_optimizer
from
theano.sandbox.cuda
import
(
CudaNdarrayType
,
HostFromGpu
,
host_from_gpu
,
GpuOp
)
...
...
@@ -341,9 +341,8 @@ convgrad_rows_stack( float* img, float* dCdH, float* dCdW,
gpu_conv_grad3d
=
GpuConvGrad3D
()
@register_opt
()
@local_optimizer
([
ConvGrad3D
])
def
local_gpu_conv_gradd
(
node
):
def
local_gpu_conv_grad
3
d
(
node
):
if
isinstance
(
node
.
op
,
ConvGrad3D
):
if
numpy
.
any
([
i
.
owner
and
isinstance
(
i
.
owner
.
op
,
HostFromGpu
)
for
i
in
node
.
inputs
]):
...
...
@@ -354,3 +353,5 @@ def local_gpu_conv_gradd(node):
d
,
WShape
,
as_cuda_ndarray_variable
(
dCdH
)))]
# Not enabled by default as we don't want people to use it.
gpu_optimizer
.
register
(
"local_gpu_conv_grad3d"
,
local_gpu_conv_grad3d
)
theano/sandbox/cuda/GpuConvTransp3D.py
浏览文件 @
0ace4aec
...
...
@@ -8,7 +8,7 @@ from theano.tensor.nnet.ConvTransp3D import ConvTransp3D
from
theano.gof
import
local_optimizer
from
theano.sandbox.cuda.basic_ops
import
as_cuda_ndarray_variable
from
theano.sandbox.cuda.opt
import
register_opt
from
theano.sandbox.cuda.opt
import
gpu_optimizer
from
theano.sandbox.cuda
import
(
CudaNdarrayType
,
HostFromGpu
,
host_from_gpu
,
GpuOp
)
...
...
@@ -347,15 +347,16 @@ conv_transp_rows_stack( float* H, float* kern, float* bias, float* R,
gpu_conv_transpd
=
GpuConvTransp3D
()
@register_opt
()
@local_optimizer
([
ConvTransp3D
])
def
local_gpu_conv_transpd
(
node
):
def
local_gpu_conv_transp
3
d
(
node
):
if
isinstance
(
node
.
op
,
ConvTransp3D
):
if
numpy
.
any
([
i
.
owner
and
isinstance
(
i
.
owner
.
op
,
HostFromGpu
)
for
i
in
node
.
inputs
]):
if
numpy
.
all
([
o
.
type
.
dtype
==
'float32'
for
o
in
node
.
outputs
]):
W
,
b
,
d
,
H
,
RShape
=
node
.
inputs
return
[
host_from_gpu
(
gpu_conv_transpd
(
W
,
b
,
d
,
H
,
RShape
))]
# Not enabled by default as we don't want people to use it.
gpu_optimizer
.
register
(
"local_gpu_conv_transp3d"
,
local_gpu_conv_transp3d
)
#If the input size wasn't a multiple of D we may need to cause some automatic padding to get the right size of reconstruction
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论