raiseRuntimeError('A C Op raised an exception. PerformLinker cannot tell you what it was though. Use a standard mode such as FAST_RUN to correct the problem.')
The Op-wise summary print the execution time of all Apply nodes executing the same Op are grouped together and the total execution time per Op is shown (so if you use dot twice, you will see only one entry there corresponding to the sum of the time spent in each of them). If two Op have different hash value, they will be separate.
The Op-wise summary print the execution time of all Apply nodes executing the same Op are grouped together and the total execution time per Op is shown (so if you use dot twice, you will see only one entry there corresponding to the sum of the time spent in each of them). If two Op have different hash value, they will be separate.
The type-Op-wise summary group the result by type of op. So event if two Op have different hash value, they will be merged.
The type-Op-wise summary group the result by type of op. So event if two Op have different hash value, they will be merged.
Their is an hack with the Op-wise summary. Go see it if you want to know more.
param: n_apply_to_print the number of apply to print. Default 15.
param: n_apply_to_print the number of apply to print. Default 15.
param: n_ops_to_print the number of ops to print. Default 20.
param: n_ops_to_print the number of ops to print. Default 20.
print'Apply-wise summary: <% of local_time spent at this position> <total of local_time spent at this position> (<Apply position>, <Apply Op name>)'
print'Apply-wise summary: <% of local_time spent at this position> <total of local_time spent at this position> <nb_call> <Apply position> <Apply Op name>'
print'\nHACK WARNING: we print the flops for some OP, but the logic don\' always work. You need to know the internal of Theano to make it work correctly. Otherwise don\'t use!'
break
print'\nOp-wise summary: < of local_time spent on this kind of Op> <cumulative seconds> <self seconds>%s <nb_call> <Op name>'%(flops_msg)
The reason that this op does the summation over convolutions within the 'stack' is that
The reason that this op does the summation over convolutions within the 'stack' is that
it allows us to be memory-efficient about how gradients are calculated. If, for
it allows us to be memory-efficient about how gradients are calculated. If, for
example, we had a convolution op that took a list of images, a list of kernels, and
example, we had a convolution op that took a list of images, a list of kernels, and
...
@@ -92,14 +91,25 @@ class ConvOp(Op):
...
@@ -92,14 +91,25 @@ class ConvOp(Op):
ifself.bsize<=self.unroll_batch:
ifself.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 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))
#find the maximum value under unroll_batch that would work
self.unroll_batch=1
new=self.unroll_batch
assert(new>=1)
whileself.bsize%new!=0:
new-=1
print"OPTIMISATION WARNING: in ConvOp.__init__() unroll_batch(%s) must be 0 or a divisor of bsize(%s). We revert it to %d. This won't change the result, but may make it slower."%(str(self.unroll_batch),str(self.bsize),new)
self.unroll_batch=new
ifself.unroll_kern>0andself.nkern%unroll_kern!=0:
ifself.unroll_kern>0andself.nkern%unroll_kern!=0:
ifself.nkern<=self.unroll_kern:
ifself.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 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))
#find the maximum value under unroll_kern that would work
self.unroll_kern=1
new=self.unroll_kern
assert(new>=1)
whileself.nkern%new!=0:
new-=1
print"OPTIMISATION WARNING: in ConvOp.__init__() unroll_kern(%s) should be 0 or a divisor of nkern(%s)We revert it to %d. This won't change the result, but may make it slower."%(str(self.unroll_kern),str(self.nkern),new)
raiseTypeError("The number of dimensions and/or broadcastable pattern of the input is incorrect for this op. Expected %s, got %s."%(self.input_broadcastable,ib))
raiseTypeError("The number of dimensions and/or broadcastable pattern of the input is incorrect for this op. Expected %s, got %s."%(self.input_broadcastable,ib))