diff --git a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py index 5946ff668887f185f9abedb504f2915c16576a57..0335dd442cb6daf0e3ee40b98684364ab6b59504 100755 --- a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py @@ -1242,6 +1242,12 @@ class OpSet9(): inputs={"input": val_x.name}, outputs=[node.name], **layer_attrs) + if val_x.dtype == 'uint8': + self.paddle_graph.add_layer( + 'paddle.cast', + inputs={"x": node.name}, + outputs=[node.name], + dtype=string('uint8')) @print_mapping_info def ConstantOfShape(self, node):