diff --git a/x2paddle/op_mapper/paddle2onnx/opset9/opset.py b/x2paddle/op_mapper/paddle2onnx/opset9/opset.py index 89c6525953208d247307ebcfa17781bbd438f164..15ddf93825d34c1d29f75311c2348ed97f096fae 100644 --- a/x2paddle/op_mapper/paddle2onnx/opset9/opset.py +++ b/x2paddle/op_mapper/paddle2onnx/opset9/opset.py @@ -802,6 +802,14 @@ class OpSet9(object): axes=op.attr('axes')) return node + def cast(self, op, block): + node = helper.make_node( + 'Cast', + inputs=op.input('X'), + outputs=op.output('Out'), + to=self.paddle_onnx_dtype_map[op.attr('out_dtype')]) + return node + def arg_max(self, op, block): node = helper.make_node( 'ArgMax',