本博客记录学习龙书的学习历程:
gtitub :https://github.com/dragen1860/Deep-Learning-with-TensorFlow-book
向开源大神致敬!
第一章绪论主要讲的是机器学习和深度学习的历史。
1.人工智能发展阶段:
他们的包含关系是:
2.机器学习
3.人工智能发展简史
4.深度学习的特点和运用
5.深度学习框架
6.环境安装
由于tensorflow2.0目前只支持cuda 10.0的安装,需要严格安装书上的版本去安装。我装了cuda 11.0的,不起作用。因此选择了安装cpu版本的。
# 使用国内清华源安装 TensorFlow CPU 版本
pip install -U tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple
安装好后,查看版本:
其他:
关于书上的自动求解梯度的样例
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
a = tf.constant(1.)
b = tf.constant(2.)
c = tf.constant(3.)
w = tf.constant(4.)
with tf.GradientTape() as tape:
tape.watch([w])
y = a * w ** 2 + b * w + c
[dy_dw] = tape.gradient(y,[w])
print(dy_dw)
输出结论和书上一样,为10 。