def ReduceLogSumExp( onnx_node, ng_inputs): # type: (NodeWrapper, List[NgraphNode]) -> NgraphNode """Compute the log sum exponent of the input tensor's element' along the provided axes.""" op = ng.exp(ng_inputs[0]) op = make_reduction_op(ng.sum, onnx_node, op) op = ng.log(op) return op
def ReduceProd( onnx_node, ng_inputs): # type: (NodeWrapper, List[NgraphNode]) -> NgraphNode """Compute the product of the input tensor's elements along the provided axes. :param onnx_node: The ONNX node representing this operation. :param ng_inputs: The input tensors. :return: The tensor with applied ReduceProd operation. """ return make_reduction_op(ng.prod, onnx_node, ng_inputs[0])