项目文件夹

文件
wehub-resource-sync 7932eadb39
Create Releases / Check for Publish preview build to test.pypi-weekly (push) Has been cancelled
Create Releases / Publish preview build to test.pypi-weekly (push) Has been cancelled
Create Releases / Publish release build to test.pypi (push) Has been cancelled
Create Releases / Publish release build to pypi (push) Has been cancelled
Create Releases / Attest CI build artifacts (push) Has been cancelled
Create Releases / Check for Publish release build to pypi (push) Has been cancelled
Create Releases / Check for Publish release build to test.pypi (rc-candidates) (push) Has been cancelled
Create Releases / Check for Publish preview build to pypi-weekly (push) Has been cancelled
Create Releases / Publish preview build to pypi-weekly (push) Has been cancelled
Create Releases / test source distribution (push) Has been cancelled
Create Releases / call-mac (push) Has been cancelled
Create Releases / call-linux (push) Has been cancelled
Create Releases / call-pyodide (push) Failing after 6s
Create Releases / call-win (push) Failing after 4s
Create Releases / call-sdist (push) Failing after 4s
CI / Test ubuntu-24.04, 3.14, External, debug=0, unity_build=0, onnx_ml=0, autogen=0 (push) Has been cancelled
CI / Test macos-latest, 3.10, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test macos-latest, 3.14, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test macos-latest, 3.14t, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, External, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.10, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14t, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test windows-2022, 3.14, External, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test windows-latest, 3.10, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test windows-latest, 3.14, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test windows-latest, 3.14t, Internal, debug=0, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, Internal, debug=1, unity_build=0, onnx_ml=1, autogen=0 (push) Has been cancelled
CI / Test ubuntu-24.04, 3.14, External, debug=0, unity_build=1, onnx_ml=1, autogen=1 (push) Has been cancelled
Generate and publish ONNX docs / build (push) Has been cancelled
Pixi CI / Install and lint (ubuntu-24.04-arm) (push) Has been cancelled
Pixi CI / Install and lint (windows-2022) (push) Has been cancelled
Pixi CI / Xcode generator build (push) Has been cancelled
Pixi CI / Install and test (macos-latest, default) (push) Has been cancelled
Pixi CI / Install and test (ubuntu-24.04-arm, default) (push) Has been cancelled
Pixi CI / Install and test (ubuntu-latest, default) (push) Has been cancelled
Pixi CI / Install and test (windows-2022, default) (push) Has been cancelled
Pixi CI / Install and test (macos-latest, oldies) (push) Has been cancelled
Pixi CI / Install and test (ubuntu-24.04-arm, oldies) (push) Has been cancelled
Pixi CI / Install and test (ubuntu-latest, oldies) (push) Has been cancelled
Pixi CI / Install and test (windows-2022, oldies) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Windows_No_Exception_CI / build (x64, 3.10) (push) Has been cancelled
Check URLs / build (push) Has been cancelled
clang-tidy / clang-tidy (push) Has been cancelled
Lint / Validate SBOM (push) Has been cancelled
Lint / Enforce style (push) Has been cancelled
Generate and publish ONNX docs / deploy (push) Has been cancelled
docs: make Chinese README the default
2026-07-13 10:36:41 +00:00

146 行
7.5 KiB
Markdown

此文件含有模棱两可的 Unicode 字符
此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。
<!-- WEHUB_ZH_README -->
> [!NOTE]
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
> [English](./README.en.md) · [原始项目](https://github.com/onnx/onnx) · [上游 README](https://github.com/onnx/onnx/blob/HEAD/README.md)
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
<!--
Copyright (c) ONNX Project Contributors
SPDX-License-Identifier: Apache-2.0
-->
<p align="center"><img width="40%" src="https://github.com/onnx/onnx/raw/main/docs/onnx-horizontal-color.png" /></p>
[![PyPI - Version](https://img.shields.io/pypi/v/onnx.svg)](https://pypi.org/project/onnx)
[![CI](https://github.com/onnx/onnx/actions/workflows/main.yml/badge.svg)](https://github.com/onnx/onnx/actions/workflows/main.yml)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3313/badge)](https://bestpractices.coreinfrastructure.org/projects/3313)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/onnx/onnx/badge)](https://api.securityscorecards.dev/projects/github.com/onnx/onnx)
[![SLSA 2](https://slsa.dev/images/gh-badge-level2.svg)](https://slsa.dev)
[![REUSE compliant](https://api.reuse.software/badge/github.com/onnx/onnx)](https://api.reuse.software/info/github.com/onnx/onnx)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![abi3 compatible](https://img.shields.io/badge/abi3-compatible-brightgreen)](https://docs.python.org/3/c-api/stable.html)
[Open Neural Network Exchange (ONNX)](https://onnx.ai) 是一个开放生态系统,使 AI 开发者能够在项目演进过程中选择最合适的工具。ONNX 为 AI 模型(包括深度学习与传统机器学习)提供开源格式。它定义了可扩展的计算图(computation graph)模型,以及内置算子(operator)与标准数据类型的定义。目前我们聚焦于推理(scoring)所需的能力。
ONNX [得到广泛支持](http://onnx.ai/supported-tools),可在众多框架、工具和硬件中找到。实现不同框架之间的互操作性,并简化从研究到生产的路径,有助于提升 AI 社区的创新速度。我们诚邀社区加入我们,共同推动 ONNX 的演进。
# 使用 ONNX
* [ONNX Python 包文档](https://onnx.ai/onnx/)
* [创建 ONNX 模型教程](https://github.com/onnx/tutorials)
* [预训练 ONNX 模型](https://github.com/onnx/models)
# 了解 ONNX 规范
* [概述](https://github.com/onnx/onnx/blob/main/docs/Overview.md)
* [ONNX 中间表示规范](https://github.com/onnx/onnx/blob/main/docs/IR.md)
* [规范的版本化原则](https://github.com/onnx/onnx/blob/main/docs/Versioning.md)
* [算子文档](https://github.com/onnx/onnx/blob/main/docs/Operators.md)
* [算子文档](https://onnx.ai/onnx/operators/index.html)(最新发布版)
* [Python API 概述](https://github.com/onnx/onnx/blob/main/docs/PythonAPIOverview.md)
# 操作 ONNX 图的编程工具
* [形状与类型推断](https://github.com/onnx/onnx/blob/main/docs/ShapeInference.md)
* [图优化](https://github.com/onnx/optimizer)
* [Opset 版本转换](https://github.com/onnx/onnx/blob/main/docs/docsgen/source/api/version_converter.md)
# 参与贡献
ONNX 是一个社区项目,开放治理模式见[此处](https://github.com/onnx/onnx/blob/main/community/readme.md).。我们鼓励你加入这项事业,贡献反馈、想法和代码。你可以参与[特别兴趣小组](https://github.com/onnx/onnx/blob/main/community/sigs.md)Special Interest Groups,SIG)和[工作组](https://github.com/onnx/onnx/blob/main/community/working-groups.md)Working Groups),共同塑造 ONNX 的未来。
查看我们的[贡献指南](https://github.com/onnx/onnx/blob/main/CONTRIBUTING.md)以开始参与。
如果你认为应将某个算子加入 ONNX 规范,请阅读
[此文](https://github.com/onnx/onnx/blob/main/docs/AddNewOp.md).
# 社区会议
指导委员会、工作组和 SIG 定期会议日程见[此处](https://onnx.ai/calendar)
社区聚会每年至少举办一次。以往社区聚会内容见:
* 2020.04.09 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14091402/LF+AI+Day+-ONNX+Community+Virtual+Meetup+-+Silicon+Valley+-+2020+April+9>
* 2020.10.14 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14092138/LF+AI+Day+-+ONNX+Community+Workshop+-+2020+October+14>
* 2021.03.24 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14092424/Instructions+for+Event+Hosts+-+LF+AI+Data+Day+-+ONNX+Virtual+Community+Meetup+-+March+2021>
* 2021.10.21 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14093194/LF+AI+Data+Day+ONNX+Community+Virtual+Meetup+-+October+2021>
* 2022.06.24 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14093969/ONNX+Community+Day+-+2022+June+24>
* 2023.06.28 <https://lf-aidata.atlassian.net/wiki/spaces/DL/pages/14094507/ONNX+Community+Day+2023+-+June+28>
# 讨论
我们鼓励你提交 [Issues](https://github.com/onnx/onnx/issues),,或使用 [Slack](https://lfaifoundation.slack.com/)(若尚未加入,请通过此[链接](https://join.slack.com/t/lfaifoundation/shared_invite/zt-3wx5vohc3-MeSYi3_dscb~u~cqs7zlPg)加入群组)进行更实时的讨论。
# 关注我们
及时了解 ONNX 最新动态。[[Facebook](https://www.facebook.com/onnxai/)] [[Twitter/X](https://twitter.com/onnxai)]
# 路线图
路线图流程每年进行。更多详情见[此处](https://github.com/onnx/steering-committee/tree/main/roadmap)
# 安装
ONNX 正式发布的包发布于 PyPI。
```sh
pip install onnx # or pip install onnx[reference] for optional reference implementation dependencies
```
[ONNX 每周构建包](https://pypi.org/project/onnx-weekly/)发布于 PyPI,便于实验与早期测试。
详细安装说明(含常见构建选项与常见错误)见[此处](https://github.com/onnx/onnx/blob/main/INSTALL.md)
# Python ABI3 兼容性
本包提供 [abi3](https://docs.python.org/3/c-api/stable.html)-compatible wheel,使单个二进制 wheel 可在多个 Python 版本(3.12 及以上)上运行。
# 测试
ONNX 使用 [pytest](https://docs.pytest.org) 作为测试驱动。运行测试前,需先安装 `pytest`
```sh
pip install pytest
```
安装 pytest 后,使用以下命令运行测试。
```sh
pytest
```
# 开发
请参阅[贡献者指南](https://github.com/onnx/onnx/blob/main/CONTRIBUTING.md)获取说明。
# 可复现构建(Linux
本项目为 Linux 提供可复现构建。
*可复现构建*指:无论由谁在何处构建,同一份源代码始终生成完全相同的二进制输出。
为实现这一点,我们采用 [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/docs/source-date-epoch/) 标准。这可固定构建时间戳及其他与时间相关的信息,使输出在不同环境下逐位一致。
### 为何重要
- **透明性**:任何人都可以验证所分发的二进制文件是否由已发布的源代码构建。
- **安全性**:防止构建过程被篡改或暗中修改。
- **信任**:用户可确信下载的二进制文件与维护者预期完全一致。
若愿意,你可使用预构建的可复现二进制文件,而无需自行从源码构建。
# 许可证
[Apache License v2.0](LICENSE)
# 商标
请查阅 [https://trademarks.justia.com](https://trademarks.justia.com/877/25/onnx-87725026.html) 了解商标信息。
[Linux Foundation 商标使用通则](https://www.linuxfoundation.org/legal/trademark-usage)
# 行为准则
[ONNX 开源行为准则](https://onnx.ai/codeofconduct.html)