text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: onnx/reference/ops/op_tan.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Tan(OpRunUnaryNum):
def _run(self, x): # type: ignore
return (np.tan(x),)
| {"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_tan.py", "license": "apache-2.0", "size": 247} |
### File: onnx/reference/ops/op_tanh.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class Tanh(OpRunUnaryNum):
def _run(self, x): # type: ignore
return (np.tanh(x),)
| {"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_tanh.py", "license": "apache-2.0", "size": 249} |
### File: onnx/reference/ops/op_tfidf_vectorizer.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from enum import IntEnum
from typing import List
import numpy as np
from onnx.reference.op_run import OpRun
class IntMap(dict): # type: ignore
def __init__(self):
dict.... | {"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_tfidf_vectorizer.py", "license": "apache-2.0", "size": 12615} |
### File: onnx/reference/ops/op_thresholded_relu.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.ops._op import OpRunUnaryNum
class ThresholdedRelu(OpRunUnaryNum):
def _run(self, x, alpha=None): # type: ignore
alpha = alpha or ... | {"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_thresholded_relu.py", "license": "apache-2.0", "size": 371} |
### File: onnx/reference/ops/op_tile.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
class Tile(OpRun):
def _run(self, x, repeats): # type: ignore
return (np.tile(x, repeats),)
| {"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_tile.py", "license": "apache-2.0", "size": 250} |
### File: onnx/reference/ops/op_topk.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
def topk_sorted_implementation(X, k, axis, largest): # type: ignore
"""
See function `_kneighbors_reduce_func
<https://git... | {"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_topk.py", "license": "apache-2.0", "size": 4869} |
### File: onnx/reference/ops/op_transpose.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
class Transpose(OpRun):
def _run(self, data, perm=None): # type: ignore
perm_ = None if (perm is None or len(perm) ==... | {"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_transpose.py", "license": "apache-2.0", "size": 574} |
### File: onnx/reference/ops/op_trilu.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
class Trilu(OpRun):
def _run(self, x, k=None, upper=None): # type: ignore
k = 0 if k is None else int(k)
if upper... | {"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_trilu.py", "license": "apache-2.0", "size": 381} |
### File: onnx/reference/ops/op_unique.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
def _specify_int64(indices, inverse_indices, counts): # type: ignore
return (
np.array(indices, dtype=np.int64),
... | {"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_unique.py", "license": "apache-2.0", "size": 1603} |
### File: onnx/reference/ops/op_unsqueeze.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
class Unsqueeze_1(OpRun):
def _run(self, data, axes=None): # type: ignore
if isinstance(axes, np.ndarray):
... | {"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_unsqueeze.py", "license": "apache-2.0", "size": 1623} |
### File: onnx/reference/ops/op_upsample.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
class Upsample(OpRun):
def _run(self, x, scale, mode=None): # type: ignore
if mode == "nearest" and scale.astype(np.in... | {"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_upsample.py", "license": "apache-2.0", "size": 590} |
### File: onnx/reference/ops/op_where.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
class Where(OpRun):
def _run(self, condition, x, y): # type: ignore
if (
x.dtype != y.dtype
and x... | {"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_where.py", "license": "apache-2.0", "size": 586} |
### File: onnx/reference/ops/op_xor.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.ops._op import OpRunBinary
class Xor(OpRunBinary):
def _run(self, x, y): # type: ignore
return (np.logical_xor(x, y),)
| {"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_xor.py", "license": "apache-2.0", "size": 257} |
### File: onnx/reference/ops_optimized/__init__.py
# Copyright (c) ONNX Project Contributors
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from onnx.reference.ops_optimized.op_conv_optimized import Conv
optimized_operators = [Conv]
__all__ = ["Conv", "optimized_operators"]
| {"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_optimized/__init__.py", "license": "apache-2.0", "size": 263} |
### File: onnx/reference/ops_optimized/op_conv_optimized.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from onnx.reference.op_run import OpRun
def _make_ind(dim, shape):
m = np.empty(shape, dtype=np.int64)
ind = [slice(0, shape[i]) for i in range(len... | {"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_optimized/op_conv_optimized.py", "license": "apache-2.0", "size": 6419} |
### File: onnx/reference/reference_evaluator.py
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from io import BytesIO
from typing import Any, Dict, List, Optional, Tuple, Union
import numpy as np
from onnx import load
from onnx.defs import onnx_opset_version
from onnx.onnx_pb 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/reference_evaluator.py", "license": "apache-2.0", "size": 22084} |
### File: onnx/serialization.py
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import warnings
__all__ = [
"registry",
]
import typing
from typing import Any, Collection, Optional, Protocol, TypeVar
import google.protobuf.json_format
import ... | {"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/serialization.py", "license": "apache-2.0", "size": 7860} |
### File: onnx/shape_inference.py
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
"""onnx shape inference. Shape inference is not guaranteed to be
complete.
"""
from __future__ import annotations
import os
from typing import Sequence
import onnx
import onnx.onnx_cpp2py_export.shap... | {"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/shape_inference.py", "license": "apache-2.0", "size": 5791} |
### File: onnx/shape_inference/attribute_binder.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "onnx/common/visitor.h"
namespace ONNX_NAMESPACE {
namespace internal { // internal/private API
using AttributeMap = std::unordered_map<std::string, const ... | {"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/shape_inference/attribute_binder.h", "license": "apache-2.0", "size": 2379} |
### File: onnx/shape_inference/implementation.cc
// Copyright (c) ONNX Project Contributors
//
// SPDX-License-Identifier: Apache-2.0
#include "onnx/shape_inference/implementation.h"
#include <algorithm>
#include <fstream>
#include <list>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#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/shape_inference/implementation.cc", "license": "apache-2.0", "size": 42064} |
### File: onnx/shape_inference/implementation.h
// Copyright (c) ONNX Project Contributors
//
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "onnx/defs/function.h"
#... | {"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/shape_inference/implementation.h", "license": "apache-2.0", "size": 19341} |
### File: onnx/string_utils.h
// Copyright (c) ONNX Project Contributors
//
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <sstream>
#include <string>
namespace ONNX_NAMESPACE {
#if defined(__ANDROID__)
template <typename T>
std::string to_string(T value) {
std::ostringstream os;
os << value;
re... | {"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/string_utils.h", "license": "apache-2.0", "size": 1276} |
### File: onnx/test/__init__.pyi
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
# This file needs to be here to enable mypy type checking for this folder.
# It doesn't make this a python module for installation purposes as a __init__.pyi would.
| {"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/test/__init__.pyi", "license": "apache-2.0", "size": 248} |
### File: onnx/test/basic_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import io
import os
import pathlib
import tempfile
import unittest
import google.protobuf.message
import google.protobuf.text_format
import parameterized
import onnx
from onnx import serialization
def... | {"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/test/basic_test.py", "license": "apache-2.0", "size": 9600} |
### File: onnx/test/checker_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from typing import Sequence
import numpy as np
import onnx.defs
import onnx.parser
from onnx import (
GraphProto,
SparseTensorProto,
TensorProto,
checker,
helper,
... | {"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/test/checker_test.py", "license": "apache-2.0", "size": 45376} |
### File: onnx/test/compose_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from typing import Callable, List, Optional, Sequence, Tuple
import numpy as np
from onnx import (
FunctionProto,
GraphProto,
ModelProto,
NodeProto,
SparseTensorPro... | {"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/test/compose_test.py", "license": "apache-2.0", "size": 35307} |
### File: onnx/test/cpp/common_path_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <list>
#include <utility>
#include "gtest/gtest.h"
#include "onnx/common/path.h"
#ifdef _WIN32
// Only test clean_relative_path and normalize_separator on non-Windows
// beca... | {"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/test/cpp/common_path_test.cc", "license": "apache-2.0", "size": 2308} |
### File: onnx/test/cpp/data_propagation_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
#include "onnx/checker.h"
#include "onnx/defs/parser.h"
#include "onnx/defs/schema.h"
#include "onnx/defs/shape_inference.h"
#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/test/cpp/data_propagation_test.cc", "license": "apache-2.0", "size": 12760} |
### File: onnx/test/cpp/function_context_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
#include "onnx/checker.h"
#include "onnx/common/constants.h"
#include "onnx/defs/function.h"
#include "onnx/defs/schema.h"
using 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/test/cpp/function_context_test.cc", "license": "apache-2.0", "size": 10604} |
### File: onnx/test/cpp/function_get_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
#include "onnx/common/constants.h"
#include "onnx/defs/schema.h"
namespace ONNX_NAMESPACE {
namespace Test {
TEST(FunctionAPITest, GetFu... | {"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/test/cpp/function_get_test.cc", "license": "apache-2.0", "size": 1440} |
### File: onnx/test/cpp/function_verify_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include <set>
#include "gtest/gtest.h"
#include "onnx/checker.h"
#include "onnx/common/constants.h"
#include "onnx/defs/parser.h"
#include "onnx/defs/printer.h... | {"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/test/cpp/function_verify_test.cc", "license": "apache-2.0", "size": 20594} |
### File: onnx/test/cpp/inliner_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
#include "onnx/checker.h"
#include "onnx/common/constants.h"
#include "onnx/defs/parser.h"
#include "onnx/defs/printer.h"
#include "onnx/defs/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/test/cpp/inliner_test.cc", "license": "apache-2.0", "size": 7801} |
### File: onnx/test/cpp/ir_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
#include "onnx/common/ir.h"
#include "onnx/common/ir_pb_converter.h"
#include "onnx/defs/printer.h"
namespace ONNX_NAMESPACE {
namespace Test {
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/test/cpp/ir_test.cc", "license": "apache-2.0", "size": 1366} |
### File: onnx/test/cpp/op_reg_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
#include "onnx/defs/schema.h"
namespace ONNX_NAMESPACE {
namespace Test {
TEST(OpRegistrationTest, GemmOp) {
auto opSchema = OpSchemaRegistry... | {"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/test/cpp/op_reg_test.cc", "license": "apache-2.0", "size": 913} |
### File: onnx/test/cpp/parser_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include "gtest/gtest.h"
#include "onnx/checker.h"
#include "onnx/defs/parser.h"
#include "onnx/defs/printer.h"
using namespace ONNX_NAMESPACE;
namespace ONNX_NAMESPACE {
namespace Test {
... | {"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/test/cpp/parser_test.cc", "license": "apache-2.0", "size": 14777} |
### File: onnx/test/cpp/schema_registration_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
#include "onnx/defs/operator_sets.h"
#include "onnx/defs/schema.h"
using namespace ONNX_NAMESPACE;
namespace ONNX_NAMESPACE {
nam... | {"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/test/cpp/schema_registration_test.cc", "license": "apache-2.0", "size": 9614} |
### File: onnx/test/cpp/shape_inference_test.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
#include "onnx/defs/parser.h"
#include "onnx/defs/schema.h"
#include "onnx/defs/shape_inference.h"
#include "onnx/onnx_pb.h"
#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/test/cpp/shape_inference_test.cc", "license": "apache-2.0", "size": 18586} |
### File: onnx/test/cpp/test_main.cc
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include "gtest/gtest.h"
GTEST_API_ int main(int argc, char** argv) {
std::cout << "Running main() from test_main.cc" << std::endl;
::testing::InitGoogleTest(&argc, 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/test/cpp/test_main.cc", "license": "apache-2.0", "size": 317} |
### File: onnx/test/data_propagation_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import unittest
# TODO: remove the following ignore after mypy upgrade in ONNX
from shape_inference_test import TestShapeInferenceHelper
import onnx.parser... | {"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/test/data_propagation_test.py", "license": "apache-2.0", "size": 4651} |
### File: onnx/test/elu_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from onnx import checker, defs, helper
class TestRelu(unittest.TestCase):
def test_elu(self) -> None:
self.assertTrue(defs.has("Elu"))
node_def = helper.make_node("Elu"... | {"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/test/elu_test.py", "license": "apache-2.0", "size": 401} |
### File: onnx/test/function_inference_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from typing import Sequence
from shape_inference_test import TestShapeInferenceHelper
import onnx
import onnx.helper
import onnx.parser
import onnx.shape_inference
from onnx ... | {"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/test/function_inference_test.py", "license": "apache-2.0", "size": 4328} |
### File: onnx/test/function_test.py
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) ONNX Project Contributors
import unittest
import onnx
from onnx import checker, utils
class TestFunction(unittest.TestCase):
def _verify_function_set(self, extracted_model, function_set, func_domain): # type: ignore
... | {"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/test/function_test.py", "license": "apache-2.0", "size": 8583} |
### File: onnx/test/helper_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import random
import struct
import unittest
from typing import Any, List, Tuple
import numpy as np
import parameterized
import pytest
from onnx import (
AttributeProto,
GraphProto,
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/test/helper_test.py", "license": "apache-2.0", "size": 36640} |
### File: onnx/test/hub_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import glob
import os
import unittest
from os.path import join
import pytest
from onnx import ModelProto, hub
@pytest.mark.skipif(
"TEST_HUB" not in os.environ or not os.environ["TEST_HUB"],
re... | {"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/test/hub_test.py", "license": "apache-2.0", "size": 3855} |
### File: onnx/test/inference_function_test.py
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) ONNX Project Contributors
import unittest
from typing import Dict, List, Optional, Tuple, Union
import numpy as np
import onnx
from onnx import TensorProto, TypeProto
from onnx.checker import ValidationError
from on... | {"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/test/inference_function_test.py", "license": "apache-2.0", "size": 9609} |
### File: onnx/test/inliner_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from onnx import inliner, parser
class InlinerTest(unittest.TestCase):
def test_basic(self):
model = parser.parse_model(
"""
<ir_version: 8, opset_i... | {"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/test/inliner_test.py", "license": "apache-2.0", "size": 3970} |
### File: onnx/test/model_inference_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import typing
import unittest
import onnx
import onnx.parser
import onnx.shape_inference
class TestModelInference(unittest.TestCase):
def _check(self, model_text: str, *expected: int):
... | {"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/test/model_inference_test.py", "license": "apache-2.0", "size": 8609} |
### File: onnx/test/numpy_helper_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from typing import Any
import numpy as np
import parameterized
import onnx
from onnx import helper, numpy_helper
def bfloat16_to_float32(ival: int) -> Any:
if ival == 0x7FC0... | {"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/test/numpy_helper_test.py", "license": "apache-2.0", "size": 22138} |
### File: onnx/test/parser_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from parameterized import parameterized
import onnx
from onnx import GraphProto, OperatorSetIdProto, checker
class TestBasicFunctions(unittest.TestCase):
def check_graph(self, grap... | {"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/test/parser_test.py", "license": "apache-2.0", "size": 9528} |
### File: onnx/test/printer_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
import onnx
from onnx import parser, printer
class TestBasicFunctions(unittest.TestCase):
def check_graph(self, graph: onnx.GraphProto) -> None:
self.assertEqual(len(graph.... | {"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/test/printer_test.py", "license": "apache-2.0", "size": 1225} |
### File: onnx/test/reference_evaluator_backend_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
# type: ignore
"""
These test evaluates the python runtime (class ReferenceEvaluator) against
all the backend tests (in onnx/backend/test/case/node) and checks
the runtime produces t... | {"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/test/reference_evaluator_backend_test.py", "license": "apache-2.0", "size": 34161} |
### File: onnx/test/reference_evaluator_ml_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
# type: ignore
import unittest
from functools import wraps
from os import getenv
import numpy as np # type: ignore
from numpy.testing import assert_allclose # type: ignore
from onnx ... | {"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/test/reference_evaluator_ml_test.py", "license": "apache-2.0", "size": 70905} |
### File: onnx/test/reference_evaluator_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
# type: ignore
"""
You can run a specific test by using the following syntax.
::
python onnx/test/reference_evaluator_test.py TestReferenceEvaluator.test_function_attribute_nested_grap... | {"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/test/reference_evaluator_test.py", "license": "apache-2.0", "size": 187660} |
### File: onnx/test/relu_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from onnx import defs, helper
class TestRelu(unittest.TestCase):
def test_relu(self) -> None:
self.assertTrue(defs.has("Relu"))
helper.make_node("Relu", ["X"], ["Y"])
... | {"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/test/relu_test.py", "license": "apache-2.0", "size": 336} |
### File: onnx/test/schema_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from typing import Sequence
import parameterized
import onnx
from onnx import defs
class TestSchema(unittest.TestCase):
def test_get_schema(self) -> None:
defs.get_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/test/schema_test.py", "license": "apache-2.0", "size": 10149} |
### File: onnx/test/serialization_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import os
import tempfile
import unittest
import onnx
_TEST_MODEL = """\
<
ir_version: 8,
opset_import: ["" : 17, "local" : 1]
>
agraph (float[N] X) => (float[N] Y) {
Y = local.foo (X... | {"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/test/serialization_test.py", "license": "apache-2.0", "size": 3193} |
### File: onnx/test/shape_inference_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import itertools
import unittest
from typing import Any, Sequence
import numpy as np
import pytest
from parameterized import parameterized
import onnx.shape... | {"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/test/shape_inference_test.py", "license": "apache-2.0", "size": 350712} |
### File: onnx/test/symbolic_shape_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
from typing import List, Optional
import onnx.shape_inference
from onnx import ModelProto, TensorProto, TensorShapeProto, ValueInfoProto, helper
from onnx.helper import make_mode... | {"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/test/symbolic_shape_test.py", "license": "apache-2.0", "size": 8558} |
### File: onnx/test/tools_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
import numpy as np
from numpy.testing import assert_allclose
import onnx
from onnx import TensorProto, helper, numpy_helper
from onnx.defs import onnx_opset_version
from onnx.reference i... | {"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/test/tools_test.py", "license": "apache-2.0", "size": 13563} |
### File: onnx/test/training_tool_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
import numpy as np
import onnx
from onnx import TensorProto, helper, numpy_helper, shape_inference
class TestTrainingTool(unittest.TestCase):
def test_training_info_proto(s... | {"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/test/training_tool_test.py", "license": "apache-2.0", "size": 3676} |
### File: onnx/test/utils_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import os
import shutil
import tempfile
import unittest
import onnx
from onnx import TensorProto, helper
class TestUtilityFunctions(unittest.TestCase):
def test_extract_model(self) -> None:
... | {"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/test/utils_test.py", "license": "apache-2.0", "size": 2218} |
### File: onnx/test/version_converter/automatic_conversion_test_base.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import string
import unittest
from typing import Any, List, Sequence, cast
import onnx
from onnx import TensorProto, ValueInfoProt... | {"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/test/version_converter/automatic_conversion_test_base.py", "license": "apache-2.0", "size": 6897} |
### File: onnx/test/version_converter/automatic_downgrade_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
import automatic_conversion_test_base
import numpy as np
import parameterized
import onnx
from onnx import helper
########################################... | {"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/test/version_converter/automatic_downgrade_test.py", "license": "apache-2.0", "size": 3268} |
### File: onnx/test/version_converter/automatic_upgrade_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import unittest
import automatic_conversion_test_base
import numpy as np
import onnx
from onnx import TensorProto, helper
##################################################... | {"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/test/version_converter/automatic_upgrade_test.py", "license": "apache-2.0", "size": 54139} |
### File: onnx/test/version_converter_test.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
import struct
import unittest
import numpy as np
import onnx.version_converter
from onnx import (
GraphProto,
ModelProto,
OperatorSetIdProto,
TensorProto,
checker,
he... | {"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/test/version_converter_test.py", "license": "apache-2.0", "size": 74226} |
### File: onnx/test/version_utils.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from packaging.version import parse as version
def numpy_older_than(ver: str) -> bool:
"""Returns True if the numpy version is older than the given version."""
import numpy # pylint: disable... | {"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/test/version_utils.py", "license": "apache-2.0", "size": 362} |
### File: onnx/tools/__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/tools/__init__.py", "license": "apache-2.0", "size": 82} |
### File: onnx/tools/net_drawer.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
# A library and utility for drawing ONNX nets. Most of this implementation has
# been borrowed from the caffe2 implementation
# https://github.com/pytorch/pytorch/blob/master/caffe2/python/net_drawer.py
#... | {"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/tools/net_drawer.py", "license": "apache-2.0", "size": 4901} |
### File: onnx/tools/replace_constants.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from typing import List, Optional, Union
import numpy as np
from onnx import (
AttributeProto,
FunctionProto,
GraphProto,
ModelProto,
NodeProto,
SparseTensorProto,
Ten... | {"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/tools/replace_constants.py", "license": "apache-2.0", "size": 14881} |
### File: onnx/tools/update_model_dims.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from typing import Any, Dict, List, Set
import onnx.checker
from onnx import ModelProto, ValueInfoProto
def update_inputs_outputs_dims(
model: ModelProto,
input_dims: Dict[str, List[Any... | {"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/tools/update_model_dims.py", "license": "apache-2.0", "size": 3436} |
### File: onnx/utils.py
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import os
import onnx.checker
import onnx.helper
import onnx.shape_inference
from onnx import FunctionProto, ModelProto, NodeProto, TensorProto, ValueInfoProto
class Extractor... | {"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/utils.py", "license": "apache-2.0", "size": 8386} |
### File: onnx/version_converter.py
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
"""onnx version converter
This enables users to convert their models between different opsets within the
default domain ("" or "ai.onnx").
"""
import onnx
import onnx.onnx_cpp2py_export.version_convert... | {"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/version_converter.py", "license": "apache-2.0", "size": 6629} |
### File: onnx/version_converter/BaseConverter.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Version converter interface for ONNX models between different opset versions.
#pragma once
#include <stdlib.h>
#include <iostream>
#include <map>
#include <memory>
#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/version_converter/BaseConverter.h", "license": "apache-2.0", "size": 3757} |
### File: onnx/version_converter/adapters/adapter.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Interface for Op Version Adapters
#pragma once
#include <functional>
#include <memory>
#include <string>
#include "onnx/onnx_pb.h"
#include "onnx/version_converter/helper.... | {"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/version_converter/adapters/adapter.h", "license": "apache-2.0", "size": 1808} |
### File: onnx/version_converter/adapters/axes_attribute_to_input.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for all ops that remove consumed_inputs
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "onnx/version_converter/adapter... | {"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/version_converter/adapters/axes_attribute_to_input.h", "license": "apache-2.0", "size": 1299} |
### File: onnx/version_converter/adapters/axes_input_to_attribute.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for all ops that remove consumed_inputs
#pragma once
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "onnx/versio... | {"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/version_converter/adapters/axes_input_to_attribute.h", "license": "apache-2.0", "size": 2488} |
### File: onnx/version_converter/adapters/axis_attribute_to_input.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "onnx/version_converter/adapters/adapter.h"
namespace ONNX_NAMESPACE {
namespace v... | {"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/version_converter/adapters/axis_attribute_to_input.h", "license": "apache-2.0", "size": 2005} |
### File: onnx/version_converter/adapters/axis_input_to_attribute.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "onnx/version_converter/adapters/adapter.h"
namespace ONNX_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/version_converter/adapters/axis_input_to_attribute.h", "license": "apache-2.0", "size": 3069} |
### File: onnx/version_converter/adapters/batch_normalization_13_14.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for BatchNormalization in default domain from version 13 to 14
#pragma once
#include "onnx/version_converter/adapters/adapter.h"
namespace ONNX_N... | {"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/version_converter/adapters/batch_normalization_13_14.h", "license": "apache-2.0", "size": 864} |
### File: onnx/version_converter/adapters/broadcast_backward_compatibility.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for broadcasting ops in default domain from version 7 to 6
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "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/version_converter/adapters/broadcast_backward_compatibility.h", "license": "apache-2.0", "size": 2153} |
### File: onnx/version_converter/adapters/broadcast_forward_compatibility.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for broadcasting ops in default domain from version 6 to 7
#pragma once
#include <memory>
#include <string>
#include <utility>
#include <vec... | {"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/version_converter/adapters/broadcast_forward_compatibility.h", "license": "apache-2.0", "size": 3270} |
### File: onnx/version_converter/adapters/cast_9_8.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Cast in default domain from version 9 to 8
#pragma once
#include <memory>
#include "onnx/version_converter/adapters/adapter.h"
namespace ONNX_NAMESPACE {
nam... | {"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/version_converter/adapters/cast_9_8.h", "license": "apache-2.0", "size": 875} |
### File: onnx/version_converter/adapters/clip_10_11.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Clip in default domain from version 10 to 11
#pragma once
#include <limits>
#include <memory>
namespace ONNX_NAMESPACE {
namespace version_conversion {
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/version_converter/adapters/clip_10_11.h", "license": "apache-2.0", "size": 1500} |
### File: onnx/version_converter/adapters/compatible.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter indicating compatibility of op between opsets with separate
// definitions
#pragma once
#include <memory>
#include <string>
#include "onnx/version_converter/ada... | {"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/version_converter/adapters/compatible.h", "license": "apache-2.0", "size": 698} |
### File: onnx/version_converter/adapters/dropout_11_12.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Dropout in default domain from version 11 to 12
#pragma once
#include <memory>
namespace ONNX_NAMESPACE {
namespace version_conversion {
class Dropout_1... | {"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/version_converter/adapters/dropout_11_12.h", "license": "apache-2.0", "size": 1130} |
### File: onnx/version_converter/adapters/extend_supported_types.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter indicating compatibility of op between opsets with separate
// definitions
#pragma once
#include <memory>
#include <string>
#include <unordered_set>
... | {"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/version_converter/adapters/extend_supported_types.h", "license": "apache-2.0", "size": 3843} |
### File: onnx/version_converter/adapters/gemm_6_7.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Gemm in default domain from version 6 to 7
#pragma once
#include <memory>
#include <vector>
#include "onnx/version_converter/adapters/adapter.h"
namespace 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/version_converter/adapters/gemm_6_7.h", "license": "apache-2.0", "size": 1644} |
### File: onnx/version_converter/adapters/gemm_7_6.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Gemm in default domain from version 7 to 6
#pragma once
#include <memory>
#include <vector>
#include "onnx/version_converter/adapters/adapter.h"
namespace 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/version_converter/adapters/gemm_7_6.h", "license": "apache-2.0", "size": 1841} |
### File: onnx/version_converter/adapters/gridsample_19_20.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for GridSample in default domain from version 19 to 20
#pragma once
#include <memory>
namespace ONNX_NAMESPACE {
namespace version_conversion {
class Gri... | {"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/version_converter/adapters/gridsample_19_20.h", "license": "apache-2.0", "size": 891} |
### File: onnx/version_converter/adapters/maxpool_8_7.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for MaxPool in default domain from version 8 to 7
#pragma once
#include <memory>
#include "onnx/version_converter/adapters/adapter.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/version_converter/adapters/maxpool_8_7.h", "license": "apache-2.0", "size": 940} |
### File: onnx/version_converter/adapters/no_previous_version.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter indicating lack of a previous version of some op before a given
// opset version.
#pragma once
#include <memory>
#include <string>
#include "onnx/versi... | {"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/version_converter/adapters/no_previous_version.h", "license": "apache-2.0", "size": 804} |
### File: onnx/version_converter/adapters/pad_10_11.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Pad in default domain from version 10 to 11
#pragma once
#include <memory>
#include <vector>
namespace ONNX_NAMESPACE {
namespace version_conversion {
class... | {"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/version_converter/adapters/pad_10_11.h", "license": "apache-2.0", "size": 1642} |
### File: onnx/version_converter/adapters/remove_consumed_inputs.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for all ops that remove consumed_inputs
#pragma once
#include <memory>
#include <string>
#include "onnx/version_converter/adapters/adapter.h"
names... | {"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/version_converter/adapters/remove_consumed_inputs.h", "license": "apache-2.0", "size": 764} |
### File: onnx/version_converter/adapters/reshape_4_5.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Reshape in default domain from version 4 to 5
#pragma once
#include <memory>
#include "onnx/version_converter/adapters/remove_consumed_inputs.h"
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/version_converter/adapters/reshape_4_5.h", "license": "apache-2.0", "size": 1352} |
### File: onnx/version_converter/adapters/reshape_5_4.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Reshape in default domain from version 5 to 4
#pragma once
#include <memory>
#include <string>
#include <utility>
#include "onnx/version_converter/adapters... | {"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/version_converter/adapters/reshape_5_4.h", "license": "apache-2.0", "size": 2546} |
### File: onnx/version_converter/adapters/resize_10_11.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Resize in default domain from version 10 to 11
#pragma once
#include <memory>
#include <vector>
namespace ONNX_NAMESPACE {
namespace version_conversion {
... | {"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/version_converter/adapters/resize_10_11.h", "license": "apache-2.0", "size": 1252} |
### File: onnx/version_converter/adapters/scan_8_9.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Scan in default domain from version 8 to 9
#pragma once
#include <memory>
#include <utility>
#include <vector>
#include "onnx/version_converter/adapters/adapt... | {"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/version_converter/adapters/scan_8_9.h", "license": "apache-2.0", "size": 1740} |
### File: onnx/version_converter/adapters/scan_9_8.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Scan in default domain from version 9 to 8
#pragma once
#include <memory>
#include <utility>
#include <vector>
#include "onnx/version_converter/adapters/adapt... | {"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/version_converter/adapters/scan_9_8.h", "license": "apache-2.0", "size": 2894} |
### File: onnx/version_converter/adapters/scatter_10_11.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Scatter in default domain from version 10 to 11
#pragma once
#include <memory>
namespace ONNX_NAMESPACE {
namespace version_conversion {
class Scatter_1... | {"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/version_converter/adapters/scatter_10_11.h", "license": "apache-2.0", "size": 1176} |
### File: onnx/version_converter/adapters/slice_9_10.h
// Copyright (c) ONNX Project Contributors
/*
* SPDX-License-Identifier: Apache-2.0
*/
// Adapter for Slice in default domain from version 9 to 10
#pragma once
#include <memory>
#include <vector>
namespace ONNX_NAMESPACE {
namespace version_conversion {
cla... | {"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/version_converter/adapters/slice_9_10.h", "license": "apache-2.0", "size": 1438} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.