提交 5ba674f4 authored 作者: Frederic Bastien's avatar Frederic Bastien

added assert

上级 ab8faa5b
...@@ -185,6 +185,7 @@ class ConvOp(Op): ...@@ -185,6 +185,7 @@ class ConvOp(Op):
dw = ConvOp(imshp, kshp, nkern, bsize, 1,1, output_mode='valid', dw = ConvOp(imshp, kshp, nkern, bsize, 1,1, output_mode='valid',
unroll_batch=un_b, unroll_kern=un_k)(img,filters) unroll_batch=un_b, unroll_kern=un_k)(img,filters)
assert (dw.owner.op.outshp==self.kshp).all()
if self.out_mode == 'valid': if self.out_mode == 'valid':
# before DimShuffle, dw is of shape visdim x nkern x kshp[0] x kshp[1] # before DimShuffle, dw is of shape visdim x nkern x kshp[0] x kshp[1]
dw = tensor.DimShuffle(dw.broadcastable, (1,0,2,3))(dw) dw = tensor.DimShuffle(dw.broadcastable, (1,0,2,3))(dw)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论