提交 d57899df authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Slight fix in error message.

上级 3428dc8e
...@@ -47,13 +47,13 @@ class ConvOp(Op): ...@@ -47,13 +47,13 @@ class ConvOp(Op):
if self.bsize<=self.unroll_batch: if self.bsize<=self.unroll_batch:
self.unroll_batch = self.bsize self.unroll_batch = self.bsize
else: else:
print "OPTIMISATION WARNING: in ConvOp.__init__() unroll_batch(%s) must be 0 or a multiple of bsize(%s). We revert it to 1. This won't change the result, but may make it slower."%(str(self.unroll_batch),str(self.bsize)) print "OPTIMISATION WARNING: in ConvOp.__init__() unroll_batch(%s) must be 0 or a divisor of bsize(%s). We revert it to 1. This won't change the result, but may make it slower."%(str(self.unroll_batch),str(self.bsize))
self.unroll_batch=1 self.unroll_batch=1
if self.unroll_kern>0 and self.nkern % unroll_kern!=0: if self.unroll_kern>0 and self.nkern % unroll_kern!=0:
if self.nkern<=self.unroll_kern: if self.nkern<=self.unroll_kern:
self.unroll_kern = self.nkern self.unroll_kern = self.nkern
else: else:
print "OPTIMISATION WARNING: in ConvOp.__init__() unroll_kern(%s) should be 0 or a multiple of nkern(%s)We revert it to 1. This won't change the result, but may make it slower."%(str(self.unroll_kern),str(self.nkern)) print "OPTIMISATION WARNING: in ConvOp.__init__() unroll_kern(%s) should be 0 or a divisor of nkern(%s)We revert it to 1. This won't change the result, but may make it slower."%(str(self.unroll_kern),str(self.nkern))
self.unroll_kern=1 self.unroll_kern=1
self.outshp = getFilterOutShp(self.imshp, kshp, (dx,dy), output_mode) self.outshp = getFilterOutShp(self.imshp, kshp, (dx,dy), output_mode)
self.fulloutshp = getFilterOutShp(self.imshp, kshp, (1,1), output_mode) self.fulloutshp = getFilterOutShp(self.imshp, kshp, (1,1), output_mode)
...@@ -111,7 +111,7 @@ class ConvOp(Op): ...@@ -111,7 +111,7 @@ class ConvOp(Op):
img2d = img2d.reshape((self.bsize,)+ self.imshp) img2d = img2d.reshape((self.bsize,)+ self.imshp)
filtersflipped = filtersflipped.reshape((self.nkern,self.imshp[0])+self.kshp) filtersflipped = filtersflipped.reshape((self.nkern,self.imshp[0])+self.kshp)
for b in range(self.bsize): for b in range(self.bsize):
for n in range(self.nkern): for n in range(self.nkern):
zz[b,n,...].fill(0) zz[b,n,...].fill(0)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论