text
stringlengths
24
1.04M
metadata
stringlengths
233
497
### File: onnx/defs/data_type_utils.h /* * SPDX-License-Identifier: Apache-2.0 */ #ifndef ONNX_DATA_TYPE_UTILS_H #define ONNX_DATA_TYPE_UTILS_H #include <mutex> #include <string> #include <unordered_map> #include <unordered_set> #include "onnx/common/common.h" #include "onnx/onnx_pb.h" namespace ONNX_NAMESPACE { ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/data_type_utils.h", "license": "apache-2.0", "size": 2456}
### File: onnx/defs/function.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/function.h" #include <map> #include "onnx/defs/schema.h" #include "onnx/string_utils.h" namespace ONNX_NAMESPACE { std::string InteralTensorNameGenerator(const std::string& node_name, const std::string& internal_name) ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/function.cc", "license": "apache-2.0", "size": 5541}
### File: onnx/defs/function.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <mutex> #include <string> #include <unordered_map> #include <utility> #include <vector> #include "attr_proto_util.h" #include "onnx/common/constants.h" #include "onnx/common/status.h" #include "onnx/defs/parser.h" #inc...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/function.h", "license": "apache-2.0", "size": 6095}
### File: onnx/defs/gen_doc.py #!/usr/bin/env python # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 import os from collections import defaultdict from typing import Any, Dict, List, NamedTuple, Sequence, Set, Tuple import numpy as np from onnx import defs, helper from onnx.backend....
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/gen_doc.py", "license": "apache-2.0", "size": 16397}
### File: onnx/defs/gen_shape_inference_information.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 from onnx import defs def main() -> None: # domain -> support level -> name -> [schema] with_inference = [] without_inference = [] for schema in defs.get_all_schema...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/gen_shape_inference_information.py", "license": "apache-2.0", "size": 840}
### File: onnx/defs/generator/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <cmath> #include "onnx/defs/function.h" #include "onnx/defs/generator/utils.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* Constant_ver19_doc = R"DOC( This operator produc...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/generator/defs.cc", "license": "apache-2.0", "size": 27266}
### File: onnx/defs/generator/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <functional> #include "onnx/defs/generator/utils.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* Constant_ver13_doc = R"DOC( This operator produces a constant tensor. Exactl...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/generator/old.cc", "license": "apache-2.0", "size": 10557}
### File: onnx/defs/generator/utils.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/generator/utils.h" #include <algorithm> #include <cmath> namespace ONNX_NAMESPACE { void ConstantOpInference(InferenceContext& ctx) { auto* value = ctx.getAttribute("value"); auto* sparse_value = ctx.getAttr...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/generator/utils.cc", "license": "apache-2.0", "size": 3627}
### File: onnx/defs/generator/utils.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { void ConstantOpInference(InferenceContext& ctx); } // namespace ONNX_NAMESPACE
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/generator/utils.h", "license": "apache-2.0", "size": 200}
### File: onnx/defs/image/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <functional> #include "onnx/defs/data_type_utils.h" #include "onnx/defs/schema.h" #include "onnx/defs/tensor_proto_util.h" namespace ONNX_NAMESPACE { static const char* ImageDecoder_ver20_doc = R"DOC(Loads and decodes and i...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/image/defs.cc", "license": "apache-2.0", "size": 2765}
### File: onnx/defs/logical/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { inline void unaryLogicalOpInference(InferenceContext& ctx) { // Type inference updateOutputElemType(ctx, 0, TensorProto::BOOL); // Shape inf...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/logical/defs.cc", "license": "apache-2.0", "size": 11824}
### File: onnx/defs/logical/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" using namespace ONNX_NAMESPACE; namespace ONNX_NAMESPACE { std::function<void(OpSchema&)> BinaryLogicDocGenerator_opset12(const char* name) { return [=](OpSchema& schema) { std::string doc; POPUL...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/logical/old.cc", "license": "apache-2.0", "size": 10060}
### File: onnx/defs/math/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <functional> #include "onnx/common/assertions.h" #include "onnx/defs/data_type_utils.h" #include "onnx/defs/function.h" #include "onnx/defs/math/utils.h" #include "onnx/defs/schema.h" #include "onnx/defs/tenso...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/math/defs.cc", "license": "apache-2.0", "size": 145939}
### File: onnx/defs/math/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <functional> #include "onnx/defs/function.h" #include "onnx/defs/math/utils.h" #include "onnx/defs/schema.h" #include "onnx/defs/tensor_proto_util.h" namespace ONNX_NAMESPACE { std::function<void(OpSchema&)> MathDocGenerator_opse...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/math/old.cc", "license": "apache-2.0", "size": 127899}
### File: onnx/defs/math/utils.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "onnx/defs/shape_inference.h" #include "onnx/defs/tensor_proto_util.h" #include "onnx/onnx_pb.h" namespace ONNX_NAMESPACE { namespace defs { namespace math { namespace utils { template <typename T> T GetScalarValueFr...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/math/utils.h", "license": "apache-2.0", "size": 1095}
### File: onnx/defs/nn/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <cmath> #include "onnx/common/assertions.h" #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { const char* pads_doc = "Padding for the beginning and ending along each s...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/nn/defs.cc", "license": "apache-2.0", "size": 123428}
### File: onnx/defs/nn/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <cmath> #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* Dropout_ver12_doc = R"DOC( Dropout takes an input floating-point tensor, an optional input ratio (floating-point sc...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/nn/old.cc", "license": "apache-2.0", "size": 99110}
### File: onnx/defs/object_detection/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" using namespace ONNX_NAMESPACE; namespace ONNX_NAMESPACE { static const char* RoiAlign_ver16_doc = R"DOC( Region of Interest (RoI) align operation described in the [Mask R-CNN paper](https://arxiv...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/object_detection/defs.cc", "license": "apache-2.0", "size": 9319}
### File: onnx/defs/object_detection/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" using namespace ONNX_NAMESPACE; namespace ONNX_NAMESPACE { static const char* RoiAlign_ver10_doc = R"DOC( Region of Interest (RoI) align operation described in the [Mask R-CNN paper](https://arxiv....
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/object_detection/old.cc", "license": "apache-2.0", "size": 8155}
### File: onnx/defs/operator_sets.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { // Forward declarations for ai.onnx version 1 class ONNX_OPERATOR_SET_SCHEMA_CLASS_NAME(Onnx, 1, Abs); class ONNX_OPERATOR_SET_SCHEMA_CLASS_NAME(Onnx, 1, Add); clas...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/operator_sets.h", "license": "apache-2.0", "size": 74736}
### File: onnx/defs/operator_sets_ml.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #ifdef ONNX_ML #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { // Forward declarations for ai.onnx.ml version 1 class ONNX_OPERATOR_SET_SCHEMA_CLASS_NAME(OnnxML, 1, ArrayFeatureExtractor); class ONNX_OPERATOR...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/operator_sets_ml.h", "license": "apache-2.0", "size": 4380}
### File: onnx/defs/operator_sets_preview.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { // Declare training operators. class ONNX_PREVIEW_OPERATOR_SET_SCHEMA_CLASS_NAME(1, Gradient); class ONNX_PREVIEW_OPERATOR_SET_SCHEMA_CLASS_NAME(1, Momentu...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/operator_sets_preview.h", "license": "apache-2.0", "size": 1236}
### File: onnx/defs/operator_sets_training.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { // Declare training operators. // Iterate over schema from ai.onnx.training version 1 class OpSet_OnnxTraining_ver1 { public: static void ForEachSchema...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/operator_sets_training.h", "license": "apache-2.0", "size": 494}
### File: onnx/defs/optional/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <numeric> #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static std::vector<std::string> optional_and_tensor_types() { auto optional_types = OpSchema::all_optio...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/optional/defs.cc", "license": "apache-2.0", "size": 6516}
### File: onnx/defs/optional/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <numeric> #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* OptionalHasElement_ver1_doc = R"DOC( Returns true if the optional-type input contains a...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/optional/old.cc", "license": "apache-2.0", "size": 3413}
### File: onnx/defs/parser.cc /* * SPDX-License-Identifier: Apache-2.0 */ // Experimental language syntax and parser for ONNX. Please note that the syntax as formalized // by this parser is preliminary and may change. #include "onnx/defs/parser.h" #include <iostream> #include <stdexcept> #include <string> #include...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/parser.cc", "license": "apache-2.0", "size": 25349}
### File: onnx/defs/parser.h /* * SPDX-License-Identifier: Apache-2.0 */ // Experimental language syntax and parser for ONNX. Please note that the syntax as formalized // by this parser is preliminary and may change. #pragma once #include <ctype.h> #include <iostream> #include <stdexcept> #include <string> #inclu...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/parser.h", "license": "apache-2.0", "size": 12445}
### File: onnx/defs/printer.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/printer.h" #include <iomanip> #include <vector> #include "onnx/defs/tensor_proto_util.h" namespace ONNX_NAMESPACE { using MetaDataProp = StringStringEntryProto; using MetaDataProps = google::protobuf::RepeatedPtrField<...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/printer.cc", "license": "apache-2.0", "size": 13240}
### File: onnx/defs/printer.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <iostream> #include <string> #include "onnx/defs/parser.h" #include "onnx/onnx_pb.h" namespace ONNX_NAMESPACE { std::ostream& operator<<(std::ostream& os, const TensorShapeProto_Dimension& dim); std::ostream& operato...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/printer.h", "license": "apache-2.0", "size": 1385}
### File: onnx/defs/quantization/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* QuantizeLinear_ver19_doc = R"DOC( The linear quantization operator. It consumes a high precision tensor, a scale, and a ze...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/quantization/defs.cc", "license": "apache-2.0", "size": 10048}
### File: onnx/defs/quantization/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* QuantizeLinear_ver13_doc = R"DOC( The linear quantization operator. It consumes a high precision tensor, a scale, and a zer...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/quantization/old.cc", "license": "apache-2.0", "size": 8995}
### File: onnx/defs/reduction/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <functional> #include "onnx/defs/function.h" #include "onnx/defs/reduction/utils.h" #include "onnx/defs/schema.h" #include "onnx/defs/tensor_proto_util.h" namespace ONNX_NAMESPACE { ONNX_OPERATOR_SET_SC...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/reduction/defs.cc", "license": "apache-2.0", "size": 6132}
### File: onnx/defs/reduction/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <functional> #include "onnx/defs/reduction/utils.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { std::vector<std::string> GetSupportedDataTypesForReductionOps_opset12(bool supports8bit) { i...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/reduction/old.cc", "license": "apache-2.0", "size": 18988}
### File: onnx/defs/reduction/utils.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/reduction/utils.h" #include <algorithm> #include <string> #include <vector> namespace ONNX_NAMESPACE { std::vector<std::string> GetSupportedDataTypesForReductionOps(bool supports8bit, bool supports_bool) { aut...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/reduction/utils.cc", "license": "apache-2.0", "size": 6212}
### File: onnx/defs/reduction/utils.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <cmath> #include "onnx/defs/schema.h" #include "onnx/defs/tensor_proto_util.h" namespace ONNX_NAMESPACE { // Constants used to indicate value returned by reduction of an empty set of values. constexpr const ch...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/reduction/utils.h", "license": "apache-2.0", "size": 1519}
### File: onnx/defs/rnn/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { void RNNShapeInference(InferenceContext& ctx) { TensorShapeProto::Dimension num_directions, seq_length, batch_size, hidden_size; auto direction = getAttribute(ctx, "direction", "...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/rnn/defs.cc", "license": "apache-2.0", "size": 19570}
### File: onnx/defs/rnn/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { std::function<void(OpSchema&)> RNNDocGeneratorOld(const char* /*name*/) { return [=](OpSchema& schema) { schema.Attr( "direction", "Specify if the RNN is forward,...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/rnn/old.cc", "license": "apache-2.0", "size": 39020}
### File: onnx/defs/schema.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" #include <stdexcept> #include <unordered_set> #include <utility> #include "onnx/checker.h" #include "onnx/defs/operator_sets.h" #include "onnx/defs/operator_sets_preview.h" #include "onnx/defs/operator_sets_trai...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/schema.cc", "license": "apache-2.0", "size": 43403}
### File: onnx/defs/schema.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <climits> #include <cstring> #include <functional> #include <initializer_list> #include <iostream> #include <limits> #include <map> #include <memory> #include <ostream> #include <set> #include <string> #include <tuple> #i...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/schema.h", "license": "apache-2.0", "size": 57834}
### File: onnx/defs/sequence/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <numeric> #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* SequenceEmpty_ver11_doc = R"DOC( Construct an empty tensor sequence, with given data ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/sequence/defs.cc", "license": "apache-2.0", "size": 34034}
### File: onnx/defs/shape_inference.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "shape_inference.h" #include <vector> #include "onnx/defs/tensor_proto_util.h" namespace ONNX_NAMESPACE { // Note: for all methods below for propagating type or shape, callers are // responsible to handle optional inputs/...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/shape_inference.cc", "license": "apache-2.0", "size": 21872}
### File: onnx/defs/shape_inference.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <algorithm> #include <functional> #include <string> #include <utility> #include <vector> #include "onnx/defs/data_type_utils.h" #include "onnx/proto_utils.h" #include "onnx/string_utils.h" namespace ONNX_NAMESP...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/shape_inference.h", "license": "apache-2.0", "size": 33786}
### File: onnx/defs/tensor/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <cmath> #include <numeric> #include "onnx/defs/data_propagators.h" #include "onnx/defs/function.h" #include "onnx/defs/tensor/utils.h" #include "onnx/defs/tensor_proto_util.h" namespace ONNX_NAMESPACE { st...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/tensor/defs.cc", "license": "apache-2.0", "size": 162706}
### File: onnx/defs/tensor/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <cmath> #include <numeric> #include "onnx/defs/data_propagators.h" #include "onnx/defs/function.h" #include "onnx/defs/tensor/utils.h" namespace ONNX_NAMESPACE { static const char* Cast_ver13_doc = R"DOC( T...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/tensor/old.cc", "license": "apache-2.0", "size": 228134}
### File: onnx/defs/tensor/utils.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/tensor/utils.h" #include <algorithm> #include <limits> #include <numeric> #include <string> #include <utility> #include <vector> namespace ONNX_NAMESPACE { void resizeShapeInferenceHelper( const TensorShapeProto...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/tensor/utils.cc", "license": "apache-2.0", "size": 18765}
### File: onnx/defs/tensor/utils.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <cmath> #include <vector> #include "onnx/defs/schema.h" #include "onnx/defs/tensor_proto_util.h" namespace ONNX_NAMESPACE { // The below is called by ops after opset 11, inclusively. void resizeShapeInference(Infe...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/tensor/utils.h", "license": "apache-2.0", "size": 1603}
### File: onnx/defs/tensor_proto_util.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "tensor_proto_util.h" #include <string> #include <vector> #include "onnx/common/platform_helpers.h" #include "onnx/defs/data_type_utils.h" #include "onnx/defs/shape_inference.h" namespace ONNX_NAMESPACE { #define DEFINE...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/tensor_proto_util.cc", "license": "apache-2.0", "size": 11786}
### File: onnx/defs/tensor_proto_util.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <vector> #include "onnx/onnx-operators_pb.h" namespace ONNX_NAMESPACE { template <typename T> TensorProto ToTensor(const T& value); template <typename T> TensorProto ToTensor(const std::vector<T>& values); ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/tensor_proto_util.h", "license": "apache-2.0", "size": 399}
### File: onnx/defs/tensor_util.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "tensor_util.h" #include <string> #include <vector> #include "onnx/common/platform_helpers.h" namespace ONNX_NAMESPACE { #define DEFINE_PARSE_DATA(type, typed_data_fetch) \ template <> ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/tensor_util.cc", "license": "apache-2.0", "size": 3395}
### File: onnx/defs/tensor_util.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include <vector> #include "onnx/common/ir.h" namespace ONNX_NAMESPACE { template <typename T> const std::vector<T> ParseData(const Tensor* tensor); } // namespace ONNX_NAMESPACE
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/tensor_util.h", "license": "apache-2.0", "size": 244}
### File: onnx/defs/text/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* StringConcat_doc = R"DOC(StringConcat concatenates string tensors elementwise (with NumPy-style broadcasting support))DOC"; ONNX_OPERATOR_SET_SCHEMA( Strin...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/text/defs.cc", "license": "apache-2.0", "size": 10376}
### File: onnx/defs/traditionalml/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" #ifdef ONNX_ML namespace ONNX_NAMESPACE { static const char* ArrayFeatureExtractor_ver1_doc = R"DOC( Select elements of the input tensor based on the indices passed.<br> The indices are applie...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/traditionalml/defs.cc", "license": "apache-2.0", "size": 55308}
### File: onnx/defs/traditionalml/old.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/defs/schema.h" #ifdef ONNX_ML namespace ONNX_NAMESPACE { static const char* LabelEncoder_ver1_doc = R"DOC( Converts strings to integers and vice versa.<br> If the string default value is set, it will convert ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/traditionalml/old.cc", "license": "apache-2.0", "size": 18054}
### File: onnx/defs/training/defs.cc /* * SPDX-License-Identifier: Apache-2.0 */ #include <algorithm> #include <cmath> #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* Gradient_ver1_doc = R"DOC( Gradient operator computes the partial derivatives of a spec...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/defs/training/defs.cc", "license": "apache-2.0", "size": 27885}
### File: onnx/examples/Protobufs.ipynb { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2023-04-04T17:07:50.826940Z", "iopub.status.busy": "2023-04-04T17:07:50.826940Z", "iopub.status.idle": "2023-04-04T17:07:51.182950Z", ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx", "path": "onnx/examples/Protobufs.ipynb", "license": "apache-2.0", "size": 16506}
### File: onnx/examples/check_model.ipynb { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2023-03-06T20:16:44.956148Z", "iopub.status.busy": "2023-03-06T20:16:44.956148Z", "iopub.status.idle": "2023-03-06T20:16:45.015963Z", ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx", "path": "onnx/examples/check_model.ipynb", "license": "apache-2.0", "size": 3053}
### File: onnx/examples/load_model.ipynb { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2023-03-06T20:16:24.630453Z", "iopub.status.busy": "2023-03-06T20:16:24.630453Z", "iopub.status.idle": "2023-03-06T20:16:24.689518Z", ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx", "path": "onnx/examples/load_model.ipynb", "license": "apache-2.0", "size": 2644}
### File: onnx/examples/make_model.ipynb { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2023-03-06T20:16:09.220355Z", "iopub.status.busy": "2023-03-06T20:16:09.219355Z", "iopub.status.idle": "2023-03-06T20:16:09.481504Z", ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx", "path": "onnx/examples/make_model.ipynb", "license": "apache-2.0", "size": 4603}
### File: onnx/examples/np_array_tensorproto.ipynb { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Original Numpy array:\n", "[[1. 2. 3.]\n", " [4. 5. 6.]]\n", "\n" ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx", "path": "onnx/examples/np_array_tensorproto.ipynb", "license": "apache-2.0", "size": 3415}
### File: onnx/examples/save_model.ipynb { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The model is saved.\n" ] } ], "source": [ "import onnx\n", "import os\n",...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx", "path": "onnx/examples/save_model.ipynb", "license": "apache-2.0", "size": 1189}
### File: onnx/examples/shape_inference.ipynb { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Before shape inference, the shape info of Y is:\n", "[]\n" ] } ], "sou...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Jupyter Notebook", "repo_name": "minhanghuang/onnx", "path": "onnx/examples/shape_inference.ipynb", "license": "apache-2.0", "size": 2820}
### File: onnx/external_data_helper.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 import os import re import sys import uuid from itertools import chain from typing import Callable, Iterable, Optional from onnx.onnx_pb import AttributeProto, GraphProto, ModelProto, TensorProto ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/external_data_helper.py", "license": "apache-2.0", "size": 11764}
### File: onnx/frontend/__init__.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/frontend/__init__.py", "license": "apache-2.0", "size": 82}
### File: onnx/helper.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 import collections.abc import numbers import struct from cmath import isnan from typing import ( Any, Callable, Dict, KeysView, List, Optional, Sequence, Tuple, TypeVar, Un...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/helper.py", "license": "apache-2.0", "size": 51943}
### File: onnx/hub.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 """ONNX Model Hub This implements the python client for the ONNX model hub. """ import hashlib import json import os import sys import tarfile from io import BytesIO from os.path import join from typing import IO, A...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/hub.py", "license": "apache-2.0", "size": 17323}
### File: onnx/inliner.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import onnx import onnx.onnx_cpp2py_export.inliner as C # noqa: N812 def inline_local_functions( model: onnx.ModelProto, convert_version: bool = False ) -> onnx.ModelPr...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/inliner.py", "license": "apache-2.0", "size": 1720}
### File: onnx/inliner/inliner.cc // Copyright (c) ONNX Project Contributors /* * SPDX-License-Identifier: Apache-2.0 */ #include "onnx/inliner/inliner.h" #include <functional> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #include "onnx/common/assertions...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/inliner/inliner.cc", "license": "apache-2.0", "size": 20585}
### File: onnx/inliner/inliner.h // Copyright (c) ONNX Project Contributors /* * SPDX-License-Identifier: Apache-2.0 */ #include <memory> #include <string> #include <utility> #include <vector> #include "onnx/onnx_pb.h" namespace ONNX_NAMESPACE { namespace inliner { // A FunctionId is a pair of strings (domain, f...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/inliner/inliner.h", "license": "apache-2.0", "size": 1780}
### File: onnx/mapping.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 import warnings from typing import Any, Dict, NamedTuple, Union, cast import numpy as np from onnx import OptionalProto, SequenceProto, TensorProto class TensorDtypeMap(NamedTuple): np_dtype: np.dtype ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/mapping.py", "license": "apache-2.0", "size": 7854}
### File: onnx/numpy_helper.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 import sys from typing import Any, Dict, List, Optional, Sequence, Tuple, Union import numpy as np from onnx import MapProto, OptionalProto, SequenceProto, TensorProto, helper from onnx.external_data_hel...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/numpy_helper.py", "license": "apache-2.0", "size": 21426}
### File: onnx/onnx-data_pb.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once // clang-format off #include "onnx/onnx_pb.h" #include "onnx/onnx-data.pb.h" // clang-format on
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx-data_pb.h", "license": "apache-2.0", "size": 157}
### File: onnx/onnx-operators_pb.h /* * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "onnx/onnx_pb.h" #ifdef ONNX_ML #include "onnx/onnx-operators-ml.pb.h" #else #include "onnx/onnx-operators.pb.h" #endif
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx-operators_pb.h", "license": "apache-2.0", "size": 190}
### File: onnx/onnx_cpp2py_export/__init__.pyi # This is __init__.pyi, not __init__.py # This directory is only considered for typing information, not for actual # module implementations. ONNX_ML: bool = ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_cpp2py_export/__init__.pyi", "license": "apache-2.0", "size": 162}
### File: onnx/onnx_cpp2py_export/checker.pyi class CheckerContext: ir_version: int = ... opset_imports: dict[str, int] = ... class ValidationError(Exception): ... def check_value_info(bytes: bytes, checker_context: CheckerContext) -> None: ... def check_tensor(bytes: bytes, checker_context: CheckerContext) -...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_cpp2py_export/checker.pyi", "license": "apache-2.0", "size": 880}
### File: onnx/onnx_cpp2py_export/defs.pyi """Submodule containing all the ONNX schema definitions.""" from __future__ import annotations from typing import Sequence, overload from onnx import AttributeProto, FunctionProto class SchemaError(Exception): ... class OpSchema: def __init__( self, nam...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_cpp2py_export/defs.pyi", "license": "apache-2.0", "size": 6296}
### File: onnx/onnx_cpp2py_export/inliner.pyi # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations def inline_local_functions(model: bytes, convert_version: bool) -> bytes: """ Inlines calls to model-local function in input model and returns it. ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_cpp2py_export/inliner.pyi", "license": "apache-2.0", "size": 771}
### File: onnx/onnx_cpp2py_export/parser.pyi def parse_model(model: str) -> tuple[bool, bytes, bytes]: """ Returns (success-flag, error-message, serialized-proto). If success-flag is true, then serialized-proto contains the parsed ModelProto. Otherwise, error-message contains a string describing the pa...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_cpp2py_export/parser.pyi", "license": "apache-2.0", "size": 1214}
### File: onnx/onnx_cpp2py_export/printer.pyi def function_to_text(serialized_function_proto: bytes) -> str: ... def graph_to_text(serialized_graph_proto: bytes) -> str: ... def model_to_text(serialized_model_proto: bytes) -> str: ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_cpp2py_export/printer.pyi", "license": "apache-2.0", "size": 189}
### File: onnx/onnx_cpp2py_export/shape_inference.pyi class InferenceError(Exception): ... def infer_shapes( b: bytes, check_type: bool, strict_mode: bool, data_prop: bool ) -> bytes: ... def infer_shapes_path( model_path: str, output_path: str, check_type: bool, strict_mode: bool, data_prop:...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_cpp2py_export/shape_inference.pyi", "license": "apache-2.0", "size": 406}
### File: onnx/onnx_cpp2py_export/version_converter.pyi class ConvertError(Exception): ... # Where the first bytes are a serialized ModelProto def convert_version(bytes: bytes, target: int) -> bytes: ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_cpp2py_export/version_converter.pyi", "license": "apache-2.0", "size": 149}
### File: onnx/onnx_pb.h /* * SPDX-License-Identifier: Apache-2.0 */ #ifndef ONNX_ONNX_PB_H #define ONNX_ONNX_PB_H // Defines ONNX_EXPORT and ONNX_IMPORT. On Windows, this corresponds to // different declarations (dllexport and dllimport). On Linux/Mac, it just // resolves to the same "default visibility" setting. ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/onnx", "path": "onnx/onnx_pb.h", "license": "apache-2.0", "size": 1715}
### File: onnx/parser.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 import onnx import onnx.onnx_cpp2py_export.parser as C # noqa: N812 class ParseError(Exception): pass def parse_model(model_text: str) -> onnx.ModelProto: """Parse a string to build a ModelProto. ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/parser.py", "license": "apache-2.0", "size": 1857}
### File: onnx/printer.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 from typing import Union import onnx import onnx.onnx_cpp2py_export.printer as C # noqa: N812 def to_text(proto: Union[onnx.ModelProto, onnx.FunctionProto, onnx.GraphProto]) -> str: if isinstance(proto, ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/printer.py", "license": "apache-2.0", "size": 628}
### File: onnx/proto_utils.h // Copyright (c) ONNX Project Contributors // // SPDX-License-Identifier: Apache-2.0 #pragma once #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/io/zero_copy_stream_impl_lite.h> #include <string> #include <vector> #include "onnx/onnx_pb.h" #ifdef ONNX_USE_LITE_P...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/proto_utils.h", "license": "apache-2.0", "size": 2208}
### File: onnx/py_utils.h // Copyright (c) ONNX Project Contributors // // SPDX-License-Identifier: Apache-2.0 #pragma once #include <pybind11/pybind11.h> #include "onnx/proto_utils.h" namespace ONNX_NAMESPACE { namespace py = pybind11; template <typename Proto> bool ParseProtoFromPyBytes(Proto* proto, const py::b...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/onnx", "path": "onnx/py_utils.h", "license": "apache-2.0", "size": 545}
### File: onnx/reference/__init__.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 from onnx.reference.reference_evaluator import ReferenceEvaluator
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/__init__.py", "license": "apache-2.0", "size": 149}
### File: onnx/reference/custom_element_types.py # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 import numpy as np bfloat16 = np.dtype((np.uint16, {"bfloat16": (np.uint16, 0)})) float8e4m3fn = np.dtype((np.uint8, {"e4m3fn": (np.uint8, 0)})) float8e4m3fnuz = np.dtype((np.uint8, {"e4m...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/custom_element_types.py", "license": "apache-2.0", "size": 422}
### File: onnx/reference/op_run.py # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import abc from typing import Any, ClassVar, Iterable import numpy as np from onnx import TensorProto from onnx.defs import get_all_schemas_with_history, get_schema, onnx_opset_version from onnx.helper impor...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/op_run.py", "license": "apache-2.0", "size": 26431}
### File: onnx/reference/ops/__init__.py # Copyright (c) ONNX Project Contributors # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 from onnx.reference.ops._op_list import load_op
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/__init__.py", "license": "apache-2.0", "size": 174}
### File: onnx/reference/ops/_helpers.py # Copyright (c) ONNX Project Contributors # Copyright (c) ONNX Project Contributors # # SPDX-License-Identifier: Apache-2.0 from typing import Any, Dict, Union from onnx.reference.op_run import OpRun, _split_class_name def build_registered_operators_any_domain( module_c...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/_helpers.py", "license": "apache-2.0", "size": 1877}
### File: onnx/reference/ops/_op.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 from typing import Any, Dict import numpy as np from onnx.onnx_pb import NodeProto from onnx.reference.op_run import OpRun, RuntimeTypeError class OpRunUnary(OpRun): """ Ancestor to all unar...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/_op.py", "license": "apache-2.0", "size": 6641}
### File: onnx/reference/ops/_op_common_indices.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 import numpy as np def _get_indices(i, shape): # type: ignore res = np.empty((len(shape),), dtype=np.int64) k = len(shape) - 1 while k > 0: m = i % shape[k] ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/_op_common_indices.py", "license": "apache-2.0", "size": 734}
### File: onnx/reference/ops/_op_common_pool.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 import itertools from typing import Optional, Tuple import numpy as np from onnx.reference.op_run import OpRun from onnx.reference.ops._op_common_indices import _get_index, _get_indices ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/_op_common_pool.py", "license": "apache-2.0", "size": 10440}
### File: onnx/reference/ops/_op_common_random.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 import numpy as np from onnx.helper import tensor_dtype_to_np_dtype from onnx.reference.op_run import OpRun class _CommonRandom(OpRun): def __init__(self, onnx_node, run_params): ...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/_op_common_random.py", "license": "apache-2.0", "size": 1865}
### File: onnx/reference/ops/_op_common_window.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 import numpy as np from onnx.helper import tensor_dtype_to_np_dtype from onnx.reference.op_run import OpRun class _CommonWindow(OpRun): @staticmethod def _begin(size, periodic,...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/_op_common_window.py", "license": "apache-2.0", "size": 689}
### File: onnx/reference/ops/_op_list.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 """ Every class imported in this module defines an implementation of an operator of the main domain. Any class name uses `_` to specify a version defined in a specific opset. The class name without...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/_op_list.py", "license": "apache-2.0", "size": 16735}
### File: onnx/reference/ops/aionnx_preview_training/__init__.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 from onnx.reference.ops.aionnx_preview_training._op_list import load_op from onnx.reference.ops.aionnx_preview_training._op_run_training import OpRunTraining
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/aionnx_preview_training/__init__.py", "license": "apache-2.0", "size": 240}
### File: onnx/reference/ops/aionnx_preview_training/_op_list.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 import textwrap from typing import Any, Dict from typing import Optional as TOptional from typing import Union from onnx.reference.op_run import OpFunction from onnx.refer...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/aionnx_preview_training/_op_list.py", "license": "apache-2.0", "size": 3062}
### File: onnx/reference/ops/aionnx_preview_training/_op_run_training.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 from onnx.reference.op_run import OpRun class OpRunTraining(OpRun): op_domain = "ai.onnx.preview.training"
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/aionnx_preview_training/_op_run_training.py", "license": "apache-2.0", "size": 196}
### File: onnx/reference/ops/aionnx_preview_training/op_adagrad.py # Copyright (c) ONNX Project Contributors # SPDX-License-Identifier: Apache-2.0 import numpy as np from onnx.reference.ops.aionnx_preview_training._op_run_training import OpRunTraining def _apply_adagrad(r, t, x, g, h, norm_coefficient, epsilon, d...
{"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/onnx", "path": "onnx/reference/ops/aionnx_preview_training/op_adagrad.py", "license": "apache-2.0", "size": 1851}