提交 831c5b72 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Auto indentation.

上级 c461c59d
......@@ -207,9 +207,3 @@ def foldr( fn
, go_backwards = True
, mode = mode
, name = name )
......@@ -583,7 +583,7 @@ class ConvOp(Op):
# and ConvOp.getOutputShape doesn't handle this. In this case
# we simply let the default function do its work.
raise theano.tensor.ShapeError()
def perform(self,node, inp, out):
"""
......
......@@ -29,7 +29,7 @@ def conv2d(input, filters, image_shape=None, filter_shape=None,
a 3D tensor, corresponding to a set of 2D filters.
Shape parameters are optional and will result in faster execution.
:type input: dmatrix of dtensor3
:param input: symbolic variable for images to be filtered
:type filters: dmatrix of dtensor3
......@@ -50,13 +50,13 @@ def conv2d(input, filters, image_shape=None, filter_shape=None,
### use shape information if it is given to us ###
if filter_shape and image_shape:
if input.ndim==3:
if input.ndim==3:
bsize = image_shape[0]
else:
bsize = 1
imshp = (1,) + tuple(image_shape[-2:])
if filters.ndim==3:
if filters.ndim==3:
nkern = filter_shape[0]
else:
nkern = 1
......@@ -78,12 +78,12 @@ def conv2d(input, filters, image_shape=None, filter_shape=None,
new_input_shape = tensor.join(0, tensor.stack(sym_bsize,1), input.shape[-2:])
input4D = tensor.reshape(input, new_input_shape, ndim=4)
new_filter_shape = tensor.join(0, tensor.stack(sym_nkern,1), filters.shape[-2:])
filters4D = tensor.reshape(filters, new_filter_shape, ndim=4)
### perform actual convolution ###
op = conv.ConvOp(output_mode=border_mode,
op = conv.ConvOp(output_mode=border_mode,
dx=subsample[0], dy=subsample[1],
imshp=imshp, kshp=kshp, nkern=nkern, bsize=bsize,**kargs)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论