From a235afcd6b35340d683f4ea7c54e154029052203 Mon Sep 17 00:00:00 2001 From: auphelia <jakobapk@web.de> Date: Mon, 27 Jul 2020 14:50:56 +0100 Subject: [PATCH] [CustomOp] Update formula for exp cycles for downsampler --- src/finn/custom_op/fpgadataflow/downsampler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/finn/custom_op/fpgadataflow/downsampler.py b/src/finn/custom_op/fpgadataflow/downsampler.py index 4acca3758..15d55653b 100644 --- a/src/finn/custom_op/fpgadataflow/downsampler.py +++ b/src/finn/custom_op/fpgadataflow/downsampler.py @@ -37,12 +37,12 @@ class DownSampler(HLSCustomOp): return int(np.floor((idim - 1) / stride) + 1) def get_exp_cycles(self): - fmdim = self.get_downsampled_odim() + idim = self.get_nodeattr("ImgDim") channels = self.get_nodeattr("NumChannels") simd = self.get_nodeattr("SIMD") batch_size = self.get_nodeattr("numInputVectors") - exp_cycles = channels / simd * batch_size * fmdim * fmdim - return exp_cycles + exp_cycles = channels / simd * batch_size * idim * idim + return int(exp_cycles) def get_normal_input_shape(self): idim = self.get_nodeattr("ImgDim") -- GitLab