From e2af493f4abdb191c2980ba84055df209365c4ed Mon Sep 17 00:00:00 2001 From: Tobi-Alonso <tobi.alonso@gmail.com> Date: Wed, 1 Jul 2020 09:53:45 +0100 Subject: [PATCH] [HLSCustomOp] Fix LabelSelect_Batch compatible op data type --- src/finn/custom_op/fpgadataflow/labelselect_batch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/finn/custom_op/fpgadataflow/labelselect_batch.py b/src/finn/custom_op/fpgadataflow/labelselect_batch.py index 6656d3cd0..f61fbf12d 100644 --- a/src/finn/custom_op/fpgadataflow/labelselect_batch.py +++ b/src/finn/custom_op/fpgadataflow/labelselect_batch.py @@ -99,16 +99,16 @@ class LabelSelect_Batch(HLSCustomOp): ishape = tuple(model.get_tensor_shape(self.onnx_node.input[0])) assert ishape == exp_ishape, "Unexpected input shape." # implement tensor with correct shape - values = np.random.randn(*oshape).astype(np.float32) + values = np.random.randn(*oshape).astype(np.int64) return helper.make_node( "Constant", inputs=[], outputs=[self.onnx_node.output[0]], value=helper.make_tensor( name="const_tensor", - data_type=TensorProto.FLOAT, + data_type=TensorProto.INT64, dims=values.shape, - vals=values.flatten().astype(float), + vals=values.flatten(), ), ) -- GitLab