在这个指南中,我们将介绍如何在 TensorFlow 中创建一个简单的 "Hello World" 程序。TensorFlow 是一个强大的开源机器学习库,用于数据流编程。
快速开始
要开始使用 TensorFlow,首先需要安装 TensorFlow。您可以通过以下链接了解如何安装 TensorFlow:TensorFlow 安装指南。
示例代码
以下是一个简单的 TensorFlow "Hello World" 示例:
import tensorflow as tf
# 创建一个 TensorFlow 图
hello = tf.constant('Hello, TensorFlow!')
# 运行图
print(hello.numpy())
扩展阅读
如果您想深入了解 TensorFlow,以下是一些推荐的资源:
相关图片
TensorFlow Logo