Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
10f87868
提交
10f87868
authored
10月 26, 2015
作者:
Nicolas Ballas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
flake8
上级
f27a3981
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
8 行删除
+6
-8
test_abstractconv.py
theano/sandbox/cuda/tests/test_abstractconv.py
+2
-2
abstract_conv2d.py
theano/tensor/nnet/abstract_conv2d.py
+4
-6
没有找到文件。
theano/sandbox/cuda/tests/test_abstractconv.py
浏览文件 @
10f87868
...
@@ -97,7 +97,7 @@ class TestConv2d(unittest.TestCase):
...
@@ -97,7 +97,7 @@ class TestConv2d(unittest.TestCase):
def
run_gradweight
(
self
,
inputs_shape
,
filters_shape
,
output_shape
,
def
run_gradweight
(
self
,
inputs_shape
,
filters_shape
,
output_shape
,
ref
=
dnn_gradweight
,
subsample
=
(
1
,
1
),
filter_flip
=
True
,
ref
=
dnn_gradweight
,
subsample
=
(
1
,
1
),
filter_flip
=
True
,
verify_grad
=
True
,
mode
=
mode_without_gpu
,
border_mode
=
'valid'
,
verify_grad
=
True
,
mode
=
mode_without_gpu
,
border_mode
=
'valid'
,
device
=
'cpu'
,
provide_shape
=
False
):
device
=
'cpu'
,
provide_shape
=
False
):
inputs_val
=
numpy
.
random
.
random
(
inputs_shape
)
.
astype
(
'float32'
)
inputs_val
=
numpy
.
random
.
random
(
inputs_shape
)
.
astype
(
'float32'
)
output_val
=
numpy
.
random
.
random
(
output_shape
)
.
astype
(
'float32'
)
output_val
=
numpy
.
random
.
random
(
output_shape
)
.
astype
(
'float32'
)
...
@@ -143,7 +143,7 @@ class TestConv2d(unittest.TestCase):
...
@@ -143,7 +143,7 @@ class TestConv2d(unittest.TestCase):
def
run_gradinput
(
self
,
inputs_shape
,
filters_shape
,
output_shape
,
ref
=
dnn_gradinput
,
def
run_gradinput
(
self
,
inputs_shape
,
filters_shape
,
output_shape
,
ref
=
dnn_gradinput
,
subsample
=
(
1
,
1
),
filter_flip
=
True
,
verify_grad
=
True
,
mode
=
mode_without_gpu
,
subsample
=
(
1
,
1
),
filter_flip
=
True
,
verify_grad
=
True
,
mode
=
mode_without_gpu
,
border_mode
=
'valid'
,
device
=
'cpu'
,
provide_shape
=
False
):
border_mode
=
'valid'
,
device
=
'cpu'
,
provide_shape
=
False
):
output_val
=
numpy
.
random
.
random
(
output_shape
)
.
astype
(
'float32'
)
output_val
=
numpy
.
random
.
random
(
output_shape
)
.
astype
(
'float32'
)
filters_val
=
numpy
.
random
.
random
(
filters_shape
)
.
astype
(
'float32'
)
filters_val
=
numpy
.
random
.
random
(
filters_shape
)
.
astype
(
'float32'
)
...
...
theano/tensor/nnet/abstract_conv2d.py
浏览文件 @
10f87868
"""
"""
FIXME
Define abstract conv2d interface
"""
"""
__docformat__
=
"restructuredtext en"
import
logging
import
logging
import
theano
import
theano
...
@@ -18,6 +15,7 @@ from theano.tensor.nnet import conv2d as cpu_conv2d, ConvOp
...
@@ -18,6 +15,7 @@ from theano.tensor.nnet import conv2d as cpu_conv2d, ConvOp
from
theano.tensor.nnet.ConvGrad3D
import
convGrad3D
from
theano.tensor.nnet.ConvGrad3D
import
convGrad3D
from
theano.tensor.nnet.ConvTransp3D
import
convTransp3D
from
theano.tensor.nnet.ConvTransp3D
import
convTransp3D
__docformat__
=
"restructuredtext en"
_logger
=
logging
.
getLogger
(
"theano.tensor.nnet.conv2d"
)
_logger
=
logging
.
getLogger
(
"theano.tensor.nnet.conv2d"
)
...
@@ -144,7 +142,7 @@ class BaseAbstractConv2d(Op):
...
@@ -144,7 +142,7 @@ class BaseAbstractConv2d(Op):
def
__init__
(
self
,
def
__init__
(
self
,
imshp
=
None
,
kshp
=
None
,
imshp
=
None
,
kshp
=
None
,
border_mode
=
"valid"
,
subsample
=
(
1
,
1
),
border_mode
=
"valid"
,
subsample
=
(
1
,
1
),
filter_flip
=
True
):
filter_flip
=
True
):
if
isinstance
(
border_mode
,
int
):
if
isinstance
(
border_mode
,
int
):
border_mode
=
(
border_mode
,
border_mode
)
border_mode
=
(
border_mode
,
border_mode
)
if
isinstance
(
border_mode
,
tuple
):
if
isinstance
(
border_mode
,
tuple
):
...
@@ -192,7 +190,7 @@ class AbstractConv2d(BaseAbstractConv2d):
...
@@ -192,7 +190,7 @@ class AbstractConv2d(BaseAbstractConv2d):
kshp
=
None
,
kshp
=
None
,
border_mode
=
"valid"
,
border_mode
=
"valid"
,
subsample
=
(
1
,
1
),
subsample
=
(
1
,
1
),
filter_flip
=
True
):
filter_flip
=
True
):
super
(
AbstractConv2d
,
self
)
.
__init__
(
imshp
,
kshp
,
super
(
AbstractConv2d
,
self
)
.
__init__
(
imshp
,
kshp
,
border_mode
,
subsample
,
filter_flip
)
border_mode
,
subsample
,
filter_flip
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论