diff --git a/tf2onnx/onnx_opset/math.py b/tf2onnx/onnx_opset/math.py index 742e1b23c..2a081f6fa 100644 --- a/tf2onnx/onnx_opset/math.py +++ b/tf2onnx/onnx_opset/math.py @@ -48,7 +48,10 @@ def version_1(cls, ctx, node, **kwargs): @classmethod def version_6(cls, ctx, node, **kwargs): - pass + if node.type == "Log": + # ORT doesn't implement Log on doubles + double_to_float = {onnx_pb.TensorProto.DOUBLE: onnx_pb.TensorProto.FLOAT} + cast_node = node.maybe_cast_input([[onnx_pb.TensorProto.FLOAT]], double_to_float) @tf_op(["Acos", "Asin", "Atan", "Cos", "Sin", "Tan"])