Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
7b386621
提交
7b386621
authored
1月 21, 2015
作者:
Frédéric Bastien
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2427 from nouiz/msg
remove warning during tests
上级
f37172c1
454c63e3
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
6 行删除
+8
-6
cmodule.py
theano/gof/cmodule.py
+1
-0
blas.py
theano/sandbox/cuda/blas.py
+7
-6
没有找到文件。
theano/gof/cmodule.py
浏览文件 @
7b386621
...
@@ -666,6 +666,7 @@ class ModuleCache(object):
...
@@ -666,6 +666,7 @@ class ModuleCache(object):
# Go through directories in alphabetical order to ensure consistent
# Go through directories in alphabetical order to ensure consistent
# behavior.
# behavior.
subdirs
=
sorted
(
os
.
listdir
(
self
.
dirname
))
subdirs
=
sorted
(
os
.
listdir
(
self
.
dirname
))
files
,
root
=
None
,
None
# To make sure the "del" below works
for
root
in
subdirs
:
for
root
in
subdirs
:
root
=
os
.
path
.
join
(
self
.
dirname
,
root
)
root
=
os
.
path
.
join
(
self
.
dirname
,
root
)
key_pkl
=
os
.
path
.
join
(
root
,
'key.pkl'
)
key_pkl
=
os
.
path
.
join
(
root
,
'key.pkl'
)
...
...
theano/sandbox/cuda/blas.py
浏览文件 @
7b386621
...
@@ -894,9 +894,10 @@ class GpuCorrMM_gradWeights(BaseGpuCorrMM):
...
@@ -894,9 +894,10 @@ class GpuCorrMM_gradWeights(BaseGpuCorrMM):
raise
TypeError
(
'img must be 4D tensor'
)
raise
TypeError
(
'img must be 4D tensor'
)
if
topgrad
.
type
.
ndim
!=
4
:
if
topgrad
.
type
.
ndim
!=
4
:
raise
TypeError
(
'topgrad must be 4D tensor'
)
raise
TypeError
(
'topgrad must be 4D tensor'
)
if
self
.
subsample
!=
(
1
,
1
)
or
self
.
pad
==
"half"
:
if
self
.
subsample
!=
(
1
,
1
)
or
self
.
border_mode
==
"half"
:
if
shape
is
None
:
if
shape
is
None
:
raise
ValueError
(
'shape must be given if subsample != (1, 1) or pad == "half"'
)
raise
ValueError
(
'shape must be given if subsample != (1, 1)'
' or border_mode == "half"'
)
height_width
=
[
shape
[
0
],
shape
[
1
]]
height_width
=
[
shape
[
0
],
shape
[
1
]]
else
:
else
:
height_width
=
[]
height_width
=
[]
...
@@ -916,9 +917,9 @@ class GpuCorrMM_gradWeights(BaseGpuCorrMM):
...
@@ -916,9 +917,9 @@ class GpuCorrMM_gradWeights(BaseGpuCorrMM):
bottom
,
top
=
inp
[:
2
]
bottom
,
top
=
inp
[:
2
]
weights
,
=
grads
weights
,
=
grads
weights
=
gpu_contiguous
(
weights
)
weights
=
gpu_contiguous
(
weights
)
d_bottom
=
GpuCorrMM_gradInputs
(
self
.
border_mode
,
self
.
subsample
,
self
.
pad
)(
d_bottom
=
GpuCorrMM_gradInputs
(
self
.
border_mode
,
self
.
subsample
)(
weights
,
top
,
bottom
.
shape
[
-
2
:])
weights
,
top
,
bottom
.
shape
[
-
2
:])
d_top
=
GpuCorrMM
(
self
.
border_mode
,
self
.
subsample
,
self
.
pad
)(
d_top
=
GpuCorrMM
(
self
.
border_mode
,
self
.
subsample
)(
bottom
,
weights
)
bottom
,
weights
)
d_height_width
=
(
theano
.
gradient
.
DisconnectedType
()(),)
*
2
if
len
(
inp
)
==
4
else
()
d_height_width
=
(
theano
.
gradient
.
DisconnectedType
()(),)
*
2
if
len
(
inp
)
==
4
else
()
return
(
d_bottom
,
d_top
)
+
d_height_width
return
(
d_bottom
,
d_top
)
+
d_height_width
...
@@ -970,9 +971,9 @@ class GpuCorrMM_gradInputs(BaseGpuCorrMM):
...
@@ -970,9 +971,9 @@ class GpuCorrMM_gradInputs(BaseGpuCorrMM):
weights
,
top
=
inp
[:
2
]
weights
,
top
=
inp
[:
2
]
bottom
,
=
grads
bottom
,
=
grads
bottom
=
gpu_contiguous
(
bottom
)
bottom
=
gpu_contiguous
(
bottom
)
d_weights
=
GpuCorrMM_gradWeights
(
self
.
border_mode
,
self
.
subsample
,
self
.
pad
)(
d_weights
=
GpuCorrMM_gradWeights
(
self
.
border_mode
,
self
.
subsample
)(
bottom
,
top
,
weights
.
shape
[
-
2
:])
bottom
,
top
,
weights
.
shape
[
-
2
:])
d_top
=
GpuCorrMM
(
self
.
border_mode
,
self
.
subsample
,
self
.
pad
)(
d_top
=
GpuCorrMM
(
self
.
border_mode
,
self
.
subsample
)(
bottom
,
weights
)
bottom
,
weights
)
d_height_width
=
(
theano
.
gradient
.
DisconnectedType
()(),)
*
2
if
len
(
inp
)
==
4
else
()
d_height_width
=
(
theano
.
gradient
.
DisconnectedType
()(),)
*
2
if
len
(
inp
)
==
4
else
()
return
(
d_weights
,
d_top
)
+
d_height_width
return
(
d_weights
,
d_top
)
+
d_height_width
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论