Skip to content
Snippets Groups Projects
Commit e2af493f authored by Tobi-Alonso's avatar Tobi-Alonso
Browse files

[HLSCustomOp] Fix LabelSelect_Batch compatible op data type

parent bfcea2de
No related branches found
No related tags found
No related merge requests found
......@@ -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(),
),
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment