开源项目 GitHub Trending 2026-09-26T12:02 正文 ok 468 words

TensorFlow:面向所有人的开源机器学习框架

英文标题:🔥 tensorflow/tensorflow

TensorFlow 是一个端到端开源机器学习平台,提供覆盖工具、库与社区资源的完整生态,服务于前沿 ML 研究和应用部署。该项目由 Google Brain 的机器智能团队最初开发,现提供稳定的 Python 与 C++ API,并为其他语言提供不保证向后兼容的 API。开发者可通过 pip、Docker 或源码安装 TensorFlow,并可在 Ubuntu、Windows 的 CUDA GPU 上使用加速能力,其他设备可通过 Device Plugins 支持。项目同时提供多平台夜间构建、社区构建版本和完整贡献流程,对需要修复特定版本漏洞或维护定制构建的团队具有实际价值。
打开原文相关 2 · 机会 4
media25.0 KB media1.4 KB media22.0 KB media1.2 KB media1.2 KB media1.3 KB media975 B media975 B media1.3 KB media1.4 KB media1.3 KB

中文

Python PyPI DOI CII 最佳实践 OpenSSF Scorecard 模糊测试状态 模糊测试状态 OSSRank 贡献者公约

文档

文档

TensorFlow 是一个端到端的开源机器学习平台。它拥有全面且灵活的生态系统,涵盖工具、库和社区资源,既能帮助研究人员推动机器学习领域的技术前沿,也能让开发者轻松构建和部署由机器学习驱动的应用。

TensorFlow 最初由 Google Brain 机器智能团队的研究人员和工程师开发,用于开展机器学习与神经网络研究。不过,该框架具备足够的通用性,也可应用于其他领域。

TensorFlow 提供稳定的 Python 和 C++ API,并为其他语言提供不保证向后兼容的 API。

如需及时获取版本发布公告和安全更新,请订阅 announce@tensorflow.org。查看全部邮件列表。

有关 pip 包的安装、启用 GPU 支持、使用 Docker 容器以及从源码构建的方法,请参阅 TensorFlow 安装指南。

安装当前版本即可获得对支持 CUDA 的 GPU 显卡的支持(Ubuntu 和 Windows):

其他设备(DirectX 和 MacOS-metal)可通过 Device Plugins 获得支持。

此外,还提供体积更小、仅支持 CPU 的 TensorFlow 软件包:

 pip install tensorflow-cpu

如需将 TensorFlow 更新至最新版本,请在上述命令中添加 --upgrade 标志。

可通过 PyPI 上的 tf-nightly 和 tf-nightly-cpu 软件包获取夜间二进制版本,用于测试。

运行你的第一个 TensorFlow 程序

>>> import tensorflow as tf
>>> tf.add(1, 2).numpy()
3
>>> hello = tf.constant('Hello, TensorFlow!')
>>> hello.numpy()
b'Hello, TensorFlow!'

如需更多示例,请参阅 TensorFlow 教程。

如果你希望为 TensorFlow 做出贡献,请务必阅读贡献指南。本项目遵循 TensorFlow 的行为准则。参与本项目即表示你应遵守该准则。

我们使用 GitHub Issues 跟踪需求和缺陷;一般问题与讨论请访问 TensorFlow Forum;具体技术问题请提交至 Stack Overflow。

TensorFlow 项目致力于遵循开源软件开发领域普遍认可的最佳实践。

如需为 TensorFlow 的特定版本打补丁,例如修复缺陷或安全漏洞,请遵循以下步骤:

  • 克隆 TensorFlow 仓库,并切换至目标版本对应的分支——例如,2.8 版本使用 r2.8。
  • 应用所需变更(即执行 cherry-pick),并解决所有代码冲突。
  • 运行 TensorFlow 测试,并确保测试全部通过。
  • 从源码构建 TensorFlow pip 软件包。

你可以在 TensorFlow SIG Build 社区构建版本表中找到更多由社区支持的平台和配置。

构建类型 状态 构件
Linux CPU 状态 PyPI
Linux GPU 状态 PyPI
Linux XLA 状态 待定
macOS 状态 PyPI
Windows CPU 状态 PyPI
Windows GPU 状态 PyPI
Android 状态 下载
Raspberry Pi 0 和 1 状态 Py3
Raspberry Pi 2 和 3 状态 Py3

进一步了解 TensorFlow 社区以及如何参与贡献。

Apache License 2.0

English / 原文

Python PyPI DOI CII Best Practices OpenSSF Scorecard Fuzzing Status Fuzzing Status OSSRank Contributor Covenant

Documentation

Documentation

TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications.

TensorFlow was originally developed by researchers and engineers working within the Machine Intelligence team at Google Brain to conduct research in machine learning and neural networks. However, the framework is versatile enough to be used in other areas as well.

TensorFlow provides stable Python and C++ APIs, as well as a non-guaranteed backward compatible API for other languages.

Keep up-to-date with release announcements and security updates by subscribing to announce@tensorflow.org. See all the mailing lists.

See the TensorFlow install guide for the pip package, to enable GPU support, use a Docker container, and build from source.

To install the current release, which includes support for CUDA-enabled GPU cards (Ubuntu and Windows) :

Other devices (DirectX and MacOS-metal) are supported using Device Plugins.

A smaller CPU-only TensorFlow package is also available:

 pip install tensorflow-cpu

To update TensorFlow to the latest version, add the --upgrade flag to the commands above.

Nightly binaries are available for testing using thetf-nightly and tf-nightly-cpu packages on PyPI.

Try your first TensorFlow program

>>> import tensorflow as tf
>>> tf.add(1, 2).numpy()
3
>>> hello = tf.constant('Hello, TensorFlow!')
>>> hello.numpy()
b'Hello, TensorFlow!'

For more examples, see the TensorFlow Tutorials.

If you want to contribute to TensorFlow, be sure to review theContribution Guidelines. This project adheres to TensorFlow's Code of Conduct. By participating, you are expected to uphold this code.

We useGitHub Issues for tracking requests and bugs, please see TensorFlow Forum for general questions and discussion, and please direct specific questions to Stack Overflow.

The TensorFlow project strives to abide by generally accepted best practices in open-source software development.

Follow these steps to patch a specific version of TensorFlow, for example, to apply fixes to bugs or security vulnerabilities:

  • Clone the TensorFlow repository and switch to the appropriate branch for your desired version—for example, r2.8 for version 2.8.
  • Apply the desired changes (i.e., cherry-pick them) and resolve any code conflicts.
  • Run TensorFlow tests and ensure they pass.
  • Build the TensorFlow pip package from source.

You can find more community-supported platforms and configurations in the TensorFlow SIG Build Community Builds Table.

Build Type Status Artifacts
Linux CPU Status PyPI
Linux GPU Status PyPI
Linux XLA Status TBA
macOS Status PyPI
Windows CPU Status PyPI
Windows GPU Status PyPI
Android Status Download
Raspberry Pi 0 and 1 Status Py3
Raspberry Pi 2 and 3 Status Py3

Learn more about the TensorFlow Community and how to Contribute.

Apache License 2.0