提交 108428b7 authored 作者: Frederic Bastien's avatar Frederic Bastien

fix the computation of the number of flops. We do an add and a mul for each pixel multiplication.

上级 40d3bcf6
......@@ -177,11 +177,12 @@ class ConvOp(Op):
col=-img_col
img_col+=col
while col < max_col: #loop over kern col
self.flops+=1
self.flops+=2
col+=1
self.flops*=self.imshp[0]*self.nkern*self.bsize#for all outputs images#n_stack==self.imshp[0]
assert self.flops==self.bsize * self.nkern * self.imshp[0] * self.kshp[0] * self.kshp[1] * self.imshp[1] * self.imshp[2] * 2
def make_node(self, inputs, kerns):
# TODO: find a way to make ConvOp work for N-D (after NIPS09)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论