提交 2dab32a8 authored 作者: Frederic Bastien's avatar Frederic Bastien

disable the grad of ConvOp when dx or dy!=1 as their seam to have a bug their.…

disable the grad of ConvOp when dx or dy!=1 as their seam to have a bug their. Don't repair now as this don't seam to be used.
上级 c82a3f87
......@@ -367,6 +367,9 @@ class ConvOp(Op):
if self.imshp != self.imshp_logical or self.kshp != self.kshp_logical:
raise NotImplementedError('todo')
if self.dx!=1 or self.dy!=1:
raise Exception("ERROR: We disable ConvOp.grad now when dx!=1 or dy!=1 as we think their is a high probability of bug in it. We need to raise the error on the gradient to .1!")
all_shape = self.imshp is not None and self.kshp is not None and self.nkern is not None and self.bsize is not None
if not all_shape and (self.dx!=1 or self.dy!=1):
......
......@@ -498,7 +498,7 @@ class TestConvOp(unittest.TestCase):
imshps = [(2,3,4)]
modes = ['valid', 'full']
unroll = [(0,0,True),(1,1,False),(2,3,False),(1,1,False),(0,0,False)]#(batch,kern,patch)
ssizes = [(1,1),(2,2)]
ssizes = [(1,1)]#,(2,2)]#grad for ss!=(1,1) is currently disabled!
for typ in types:
imgs = T.TensorType(typ, (False, False, False, False),'imgs')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论