提交 913cd137 authored 作者: Frederic's avatar Frederic

Fixed indent and comment following code review.

上级 436ce734
......@@ -524,9 +524,9 @@ class ProfileStats(object):
flops_s = ""
elif hasattr(a.op, 'flops'):
fl = a.op.flops([self.variable_shape[var]
for var in a.inputs],
[self.variable_shape[var]
for var in a.outputs])
for var in a.inputs],
[self.variable_shape[var]
for var in a.outputs])
flops = '%8.1f' % (fl/1024./1024)
flops_s = '%10.1f' % (fl/1024./1024/1024/t)
else:
......
......@@ -628,11 +628,11 @@ class GpuConv(GpuOp):
assert images[1] == kerns[1]
flops = 0
if self.out_mode == "valid":
# nb mul and add by output pixed
# nb mul and add by output pixel
flops = kerns[2] * kerns[3] * 2
#nb flops by output image
# nb flops by output image
flops *= out[2] * out[3]
# for all outputs images#n_stack==self.imshp[0]
# nb patch multiplied
flops *= images[1] * kerns[0] * images[0]
else:
flops = (images[0] * kerns[0] * images[1] *
......
......@@ -572,11 +572,11 @@ class ConvOp(OpenMPOp):
assert images[1] == kerns[1]
flops = 0
if self.out_mode == "valid":
# nb mul and add by output pixed
# nb mul and add by output pixel
flops = kerns[2] * kerns[3] * 2
#nb flops by output image
flops *= out[2] * out[3]
# for all outputs images#n_stack==self.imshp[0]
# nb patch multiplied
flops *= images[1] * kerns[0] * images[0]
else:
flops = (images[0] * kerns[0] * images[1] *
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论