From eac0d660376b6ab71fab0ab870dcc10fcd29da77 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <yamanu@xilinx.com> Date: Fri, 22 Nov 2019 14:29:08 +0000 Subject: [PATCH] [StreamingFC] assume weights/thresholds already as expected --- src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py b/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py index 481e5f15d..ed9c0bd34 100644 --- a/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py +++ b/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py @@ -31,8 +31,7 @@ class StreamingFCLayer_Batch(HLSCustomOp): temp_files.append("input_{}.npy".format(in_ind)) elif in_ind == 1: weights = context[inputs] - self.WMEM = weights.shape[2] - weights = np.transpose(weights, (1, 2, 0)) + self.WMEM = weights.shape[1] weights = np.expand_dims(weights, 0) weights = numpy_to_hls_code( weights, DataType.BINARY, "weights", True, True @@ -50,8 +49,7 @@ class StreamingFCLayer_Batch(HLSCustomOp): else: thresholds = context[inputs] - self.TMEM = thresholds.shape[0] - thresholds = np.transpose(thresholds, (1, 0, 2)) + self.TMEM = thresholds.shape[1] thresholds = np.expand_dims(thresholds, 0) thresholds = numpy_to_hls_code( thresholds, DataType.BINARY, "thresholds", True, True -- GitLab