tensorflow / tensorflow

tensorflow / tensorflow

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 是一个端到端的开源机器学习平台。它拥有全面且灵活的工具、库和社区资源生态系统,使研究人员能够推动机器学习领域的前沿发展,并让开发者能够轻松构建和部署基于机器学习的应用程序。

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. TensorFlow 最初由 Google Brain 机器学习团队的研究人员和工程师开发,用于进行机器学习和神经网络方面的研究。然而,该框架功能多样,也足以应用于其他领域。TensorFlow 提供了稳定的 Python 和 C++ API,以及针对其他语言的非保证向后兼容 API。通过订阅 announce@tensorflow.org,您可以随时了解发布公告和安全更新。查看所有邮件列表。

Install 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): pip install tensorflow. 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 the tf-nightly and tf-nightly-cpu packages on PyPI. 请参阅 TensorFlow 安装指南以获取 pip 包、启用 GPU 支持、使用 Docker 容器以及从源码构建。要安装包含 CUDA 支持的 GPU 卡(Ubuntu 和 Windows)的当前版本,请运行:pip install tensorflow。其他设备(DirectX 和 MacOS-metal)通过设备插件(Device Plugins)提供支持。此外,还提供了一个更小的仅 CPU 版 TensorFlow 包:pip install tensorflow-cpu。要将 TensorFlow 更新到最新版本,请在上述命令中添加 --upgrade 标志。您可以使用 PyPI 上的 tf-nightly 和 tf-nightly-cpu 包来测试每日构建版本(Nightly binaries)。

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. 更多示例,请参阅 TensorFlow 教程。

Contribution guidelines If you want to contribute to TensorFlow, be sure to review the Contribution Guidelines. This project adheres to TensorFlow’s Code of Conduct. By participating, you are expected to uphold this code. We use GitHub 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. 如果您想为 TensorFlow 做出贡献,请务必查阅《贡献指南》。本项目遵守 TensorFlow 的《行为准则》。参与本项目即表示您同意遵守此准则。我们使用 GitHub Issues 来跟踪需求和 Bug,请访问 TensorFlow 论坛进行一般性问题讨论,并将具体技术问题发布到 Stack Overflow。TensorFlow 项目致力于遵循开源软件开发中公认的最佳实践。

Patching guidelines 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. 请按照以下步骤为特定版本的 TensorFlow 打补丁(例如修复 Bug 或安全漏洞):克隆 TensorFlow 仓库并切换到您所需版本对应的分支(例如版本 2.8 对应 r2.8)。应用所需的更改(即 cherry-pick 它们)并解决任何代码冲突。运行 TensorFlow 测试并确保它们通过。从源码构建 TensorFlow pip 包。

Continuous build status You can find more community-supported platforms and configurations in the TensorFlow SIG Build Community Builds Table. 您可以在 TensorFlow SIG Build 社区构建表中找到更多社区支持的平台和配置。

Official Builds

Build TypeStatusArtifacts
Linux CPUPyPI
Linux GPUPyPI
Linux XLATBA
macOSPyPI
Windows CPUPyPI
Windows GPUPyPI
AndroidDownload
Raspberry Pi 0 and 1Py3
Raspberry Pi 2 and 3Py3

Resources

Learn more about the TensorFlow Community and how to Contribute. 了解更多关于 TensorFlow 社区以及如何做出贡献的信息。

Courses

License Apache License 2.0