fix test_pow_type - autocasting for Pow with inputs of diff type (#937)

This commit is contained in:
Steven Anderson
2023-06-05 15:22:35 -07:00
committed by GitHub
parent 76ab379f9b
commit 079ea217a3

View File

@@ -153,7 +153,7 @@ def get_run_onnx(onnx_model: ModelProto):
if n.op_type == "Add": ret = inp[0] + inp[1]
if n.op_type == "Sub": ret = inp[0] - inp[1]
if n.op_type == "Mul": ret = inp[0] * inp[1]
if n.op_type == "Pow": ret = inp[0] ** inp[1]
if n.op_type == "Pow": ret = (inp[0] ** inp[1]).cast(inp[0].dtype)
elif n.op_type == "Split":
if 'split' not in opt: opt['split'] = [int(x) for x in safe_numpy(inp[1])] # split can be a tensor
if 'axis' not in opt: opt['axis'] = 0