def symbolic(g, self, dim=None, keepdim=None): self = _maybe_cast_reduce_op_input(g, self) if dim is None: # all-reduce path return sym_help._handle_reduce_dim_none(g, self, onnx_op_name) else: keepdim = sym_help._get_const(keepdim, 'i', 'keepdim') return g.op(onnx_op_name, self, dim, keepdims_i=keepdim)
def symbolic(g, self, dim=None, keepdim=None): self = opset9._maybe_cast_reduce_op_input(g, self) if dim is None: # all-reduce path return symbolic_helper._handle_reduce_dim_none(g, self, onnx_op_name) else: keepdim = symbolic_helper._get_const(keepdim, "i", "keepdim") return g.op(onnx_op_name, self, dim, keepdims_i=keepdim)