《30天吃掉那只 TensorFlow2.0》 开篇辞(Tensorflow 学习之路)

《30天吃掉那只 TensorFlow2.0 》开篇辞 🔥🔥

文章目录

《30天吃掉那只 TensorFlow2.0》 开篇辞(Tensorflow 学习之路)

除了学习pytorch之外,我还想写一个专栏,参考一下《30天吃掉那只 TensorFlow2.0 》进行学习,学习tensorflow2

; 一,TensorFlow2 🍎 还是 Pytorch🔥

《30天吃掉那只 TensorFlow2.0》 开篇辞(Tensorflow 学习之路)

先说结论:

如果是工程师,应该优先选TensorFlow2.

如果是学生或者研究人员,应该优先选择Pytorch.

如果时间足够,最好TensorFlow2和Pytorch都要学习掌握。

理由如下:

  • 1, 在工业界最重要的是模型落地,目前国内的大部分互联网企业只支持TensorFlow模型的在线部署,不支持Pytorch。 并且工业界更加注重的是模型的高可用性,许多时候使用的都是成熟的模型架构,调试需求并不大。
  • 2, 研究人员最重要的是快速迭代发表文章,需要尝试一些较新的模型架构。而Pytorch在易用性上相比TensorFlow2有一些优势,更加方便调试。 并且在2019年以来在学术界占领了大半壁江山,能够找到的相应最新研究成果更多。
  • 3,TensorFlow2和Pytorch实际上整体风格已经非常相似了,学会了其中一个,学习另外一个将比较容易。两种框架都掌握的话,能够参考的开源模型案例更多,并且可以方便地在两种框架之间切换。

对于我来说,除了学习pytorch之外,我还想花时间学习一下tensorflow

二,Keras🍏 和 tf.keras 🍎

《30天吃掉那只 TensorFlow2.0》 开篇辞(Tensorflow 学习之路)

先说结论:

Keras库在2.3.0版本后将不再更新,用户应该使用tf.keras。

Keras可以看成是一种深度学习框架的高阶接口规范,它帮助用户以更简洁的形式定义和训练深度学习网络。

使用pip安装的Keras库同时在tensorflow,theano,CNTK等后端基础上进行了这种高阶接口规范的实现。

而tf.keras是在TensorFlow中以TensorFlow低阶API为基础实现的这种高阶接口,它是Tensorflow的一个子模块。

tf.keras绝大部分功能和兼容多种后端的Keras库用法完全一样,但并非全部,它和TensorFlow之间的结合更为紧密。

随着谷歌对Keras的收购,Keras库2.3.0版本后也将不再进行更新,用户应当使用tf.keras而不是使用pip安装的Keras.

其实keras也一直有更新,但是有时候经常出现版本不兼容的问题,所以建议利用tf.ersa更好

; 三,本书📖面向读者 👼

本书假定读者有一定的机器学习和深度学习基础,使用过Keras或者Tensorflow1.0或者Pytorch搭建训练过模型。

对于没有任何机器学习和深度学习基础的同学,建议在学习本书时同步参考学习《Python深度学习》一书。

《Python深度学习》这本书是Keras之父Francois Chollet所著,该书假定读者无任何机器学习知识,以Keras为工具,

使用丰富的例子来演示深度学习的最佳实践,这本书很容易理解。书中没有数学公式,重在培养读者的深度学习直觉

[En]

Using rich examples to demonstrate the best practices of deep learning, the book is easy to understand. * the book does not have a mathematical formula and focuses on cultivating readers’ deep learning intuition. *.

该书电子版下载链接:https://pan.baidu.com/s/1-4q6VjLTb3ZxcefyNCbjSA 提取码:wtzo

四,本书写作风格 🍉

本书是一本对人类用户极其友善的TensorFlow2.0入门工具书,不刻意恶心读者是本书的底限要求,Don’t let me think是本书的最高追求。

本书主要是在参考TensorFlow官方文档和函数doc文档基础上整理写成的。

不过,这本书在文本结构和例证选择上做了很多优化。

[En]

However, this book has done a lot of optimization in the text structure and example selection.

与公文文本结构混乱不同,既有教程又有指南,缺乏整体布局逻辑。

[En]

Unlike the chaotic text structure of official documents, there are both tutorials and guides, lack of overall layout logic.

本书按照内容难易程度、读者检索习惯和TensorFlow自身的层次结构设计内容,循序渐进,层次清晰,方便按照功能查找相应范例。

与冗长的公文示例代码不同,本书尽可能地简化和结构化了示例设计,增强了示例的可读性和通用性,并且大多数代码片段可以立即在实践中使用。

[En]

Unlike the lengthy sample code of official documents, this book simplifies and structures the sample design as much as possible, enhances the readability and versatility of the example, and most of the code snippets can be used right away in practice.

如果说通过学习TensorFlow官方文档掌握TensorFlow2.0的难度大概是9的话,那么通过学习本书掌握TensorFlow2.0的难度应该大概是3.

谨以下图对比一下TensorFlow官方教程与本教程的差异。

《30天吃掉那只 TensorFlow2.0》 开篇辞(Tensorflow 学习之路)

; 五,本书学习方案 ⏰

1,学习计划

这本书是作者在下班后和疫情假期期间花了大约2个月的时间写成的,大多数读者应该可以在30天内完全了解它。

[En]

This book was written by the author for about 2 months after work and during the epidemic holiday, and most readers should be able to fully learn it in 30 days.

预计每天的学习时间在30分钟到2小时之间。

[En]

The study time is expected to be between 30 minutes and 2 hours per day.

当然,本书也非常适合作为TensorFlow的工具手册在工程落地时作为范例库参考。

点击学习内容蓝色标题即可进入该章节。

日期学习内容内容难度预计学习时间更新状态在线colab代码体验
一、TensorFlow的建模流程

⭐️0hour✅day1
1-1,结构化数据建模流程范例

⭐️⭐️⭐️1hour✅
在线colab

day2
1-2,图片数据建模流程范例

⭐️⭐️⭐️⭐️2hour✅
在线colab

day3
1-3,文本数据建模流程范例

⭐️⭐️⭐️⭐️⭐️2hour✅
在线colab

day4
1-4,时间序列数据建模流程范例

⭐️⭐️⭐️⭐️⭐️2hour✅
在线colab 二、TensorFlow的核心概念

⭐️0hour✅day5
2-1,张量数据结构

⭐️⭐️⭐️⭐️1hour✅
在线colab

day6
2-2,三种计算图

⭐️⭐️⭐️⭐️⭐️2hour✅
在线colab

day7
2-3,自动微分机制

⭐️⭐️⭐️1hour✅
在线colab 三、TensorFlow的层次结构

⭐️0hour✅day8
3-1,低阶API示范

⭐️⭐️0.5hour✅
在线colab

day9
3-2,中阶API示范

⭐️⭐️⭐️0.5hour✅
在线colab

day10
3-3,高阶API示范

⭐️⭐️⭐️0.5hour✅
在线colab 四、TensorFlow的低阶API

⭐️0hour✅day11
4-1,张量的结构操作

⭐️⭐️⭐️⭐️⭐️2hourday12
4-2,张量的数学运算

⭐️⭐️⭐️⭐️1hourday13
4-3,AutoGraph的使用规范

⭐️⭐️⭐️0.5hourday14
4-4,AutoGraph的机制原理

⭐️⭐️⭐️⭐️⭐️2hourday15
4-5,AutoGraph和tf.Module

⭐️⭐️⭐️⭐️1hour
五、TensorFlow的中阶API

⭐️0hourday16
5-1,数据管道Dataset

⭐️⭐️⭐️⭐️⭐️2hourday17
5-2,特征列feature_column

⭐️⭐️⭐️⭐️1hourday18
5-3,激活函数activation

⭐️⭐️⭐️0.5hourday19
5-4,模型层layers

⭐️⭐️⭐️1hourday20
5-5,损失函数losses

⭐️⭐️⭐️1hourday21
5-6,评估指标metrics

⭐️⭐️⭐️1hourday22
5-7,优化器optimizers

⭐️⭐️⭐️0.5hourday23
5-8,回调函数callbacks

⭐️⭐️⭐️⭐️1hour
六、TensorFlow的高阶API

⭐️0hourday24
6-1,构建模型的3种方法

⭐️⭐️⭐️1hourday25
6-2,训练模型的3种方法

⭐️⭐️⭐️⭐️1hourday26
6-3,使用单GPU训练模型

⭐️⭐️0.5hourday27
6-4,使用多GPU训练模型

⭐️⭐️0.5hourday28
6-5,使用TPU训练模型

⭐️⭐️0.5hourday29
6-6,使用tensorflow-serving部署模型

⭐️⭐️⭐️⭐️1hourday30
6-7,使用spark-scala调用tensorflow模型

⭐️⭐️⭐️⭐️⭐️2hour

2,学习环境

本书全部源码在jupyter中编写测试通过,建议通过git克隆到本地,并在jupyter中交互式运行学习。

为了直接能够在jupyter中打开markdown文件,建议安装jupytext,将markdown转换成ipnb。

import tensorflow as tf

tf.print("tensorflow version:",tf.__version__)

a = tf.constant("hello")
b = tf.constant("tensorflow2")
c = tf.strings.join([a,b]," ")
tf.print(c)
tensorflow version: 2.1.0
hello tensorflow2

Original: https://blog.csdn.net/weixin_45508265/article/details/126383495
Author: 风信子的猫Redamancy
Title: 《30天吃掉那只 TensorFlow2.0》 开篇辞(Tensorflow 学习之路)

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/496809/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球