TensorFlow 是 Google 开发的开源机器学习框架,适合在 Jupyter Notebook 中进行实验和开发。以下是快速上手的步骤:

  1. 安装 TensorFlow
    在 Jupyter Notebook 中运行以下命令:

    !pip install tensorflow
    

    📎 查看官方安装文档

  2. 基本概念

    • 张量(Tensor):数据的基本载体
    • 计算图(Graph):操作(Operation)的有向图结构
    • 会话(Session):执行计算图的运行环境
      📷 TensorFlow 核心概念图解
  3. 简单示例

    import tensorflow as tf
    hello = tf.constant("Hello, TensorFlow!")
    sess = tf.Session()
    print(sess.run(hello))
    

    👁️ 代码运行效果演示

  4. 扩展学习