def _convert_unary_trigonometric(self, node):
assert len(node.inputs) == 1
input_name = self._get_input_tensors(node)[0]
op = node.op.lower() // type of the unary operator
// assumes TensorFlow and Core ML has same op name
func = getattr(self._get_builder(), "add_" + op)
layer = func(name=node.name, input_name=input_name, output_name=node.name)
After Change
def _convert_unary_trigonometric(self, node):
assert len(node.inputs) == 1
input_nodes, input_names, input_types = self._get_input_tensors(node)
op = node.op.lower() // type of the unary operator
// assumes TensorFlow and Core ML has same op name
func = getattr(self._get_builder(), "add_" + op)
layer = func(name=node.name, input_name=input_names[0], output_name=node.name)