提交 06700932 authored 作者: Frederic Bastien's avatar Frederic Bastien

changed an assert for explicit error.

上级 94e728c3
...@@ -62,7 +62,9 @@ class ConvOp(Op): ...@@ -62,7 +62,9 @@ class ConvOp(Op):
if not self.out_mode in ["valid", "full"]: if not self.out_mode in ["valid", "full"]:
raise Exception("Mode %s not implemented"%self.out_mode) raise Exception("Mode %s not implemented"%self.out_mode)
assert (self.outshp >= 0).all() if not (self.outshp > 0).all():
raise Exception("Bad size for the output shape. Verify that imshp(%s) and kshp(%s) are valid"%(self.imshp,self.kshp))
hashval = hash(type(self)) hashval = hash(type(self))
for a in self.__attrnames: for a in self.__attrnames:
hashval = hashval ^ hash(getattr(self, a)) hashval = hashval ^ hash(getattr(self, a))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论