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
ifself.unroll_kern>0andself.nkern%unroll_kern!=0:
ifself.nkern<=self.unroll_kern:
self.unroll_kern=self.nkern
else:
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))
# raise NotImplementedError('Only [full,valid] modes are currently supported.')
#filters = filters[:,:,::-1,::-1]
#find good value for the unroll
#if un_b!=0 and bsize%un_b!=0:
# if bsize<un_b:
# un_b = bsize
# else:
# un_b = 1
# print "OPTIMISATION WARNING: in ConvOp.grad() we can't determine a good unroll value for the batch. Maybe you can optimize this!", bsize, un_b, self.unroll_batch, self.unroll_kern
#if un_k!=0 and nkern%un_k!=0:
# if nkern<un_k:
# un_k = nkern
# else:
# un_k = 1
# print "OPTIMISATION WARNING: in ConvOp.grad() we can't determine a good unroll value for the kernel. Maybe you can optimize this!"