
TensorFlow 2.0 学习笔记
文章平均质量分 93
TF2.0 官方教程翻译
黄水生
我比以前更专注?
展开
-
TensorFlow 2.0 Guide官方教程 个人学习笔记概览(持续更新)
一、Keras1.1 Keras 概览1.2 Keras 功能API1.3 训练和评价1.4 编写自定义层和模型1.5 保存和序列化模型1.6 Keras RNN1.7掩码和填充1.8 编写自定义回调二、Estimator2.1 Estimator三、Customization3.1 即刻执行3.2 变量3.3 张量3.4 不规则张量3.5 创建操作四、Data ...原创 2019-11-02 14:12:02 · 766 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记23 -‘Automatically upgrade code to TensorFlow 2’
本笔记参照TensorFlow Guide官方教程,主要是对‘Automatically upgrade code to TensorFlow 2’教程内容翻译和内容结构编排,原文链接:Automatically upgrade code to TensorFlow 2目录一、兼容模块(Compatibility modules)二、主推升级过程(Recommended upgrade pr...原创 2020-04-16 16:01:48 · 718 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记22 -‘Migrate your TensorFlow 1 code to TensorFlow 2‘-part2
本笔记参照TensorFlow Guide官方教程,主要是对‘Accelerator-Use a GPU’教程内容翻译和内容结构编排,原文链接:Migrate your TensorFlow 1 code to TensorFlow 2目录一、自动转换脚本二、顶级(Top-level)行为改变三、让代码适应2.0版本(make the code 2.0-native)3.1 替换v1.S...原创 2019-11-20 18:12:56 · 862 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记21 -‘Migrate your TensorFlow 1 code to TensorFlow 2‘-part1
本笔记参照TensorFlow Guide官方教程,主要是对‘Accelerator-Use a GPU’教程内容翻译和内容结构编排,原文链接:Migrate your TensorFlow 1 code to TensorFlow 2目录一、自动转换脚本二、顶级(Top-level)行为改变三、让代码适应2.0版本(make the code 2.0-native)3.1 替换v1.S...原创 2019-11-19 21:28:11 · 620 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记20 -‘Effective TensorFlow 2‘
本笔记参照TensorFlow Guide官方教程,主要是对‘Accelerator-Use a GPU’教程内容翻译和内容结构编排,原文链接:Effictive TensorFlow 2目录一、主要改动概览1.1 API 清理(cleanup)1.2 即刻执行(Eager execution)1.3 全局变量消失(No more globals)1.4 功能,而不是会话(Functi...原创 2019-11-11 16:33:13 · 1080 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记19 -‘Accelerator-Use a GPU‘
本笔记参照TensorFlow Guide官方教程,主要是对‘Accelerator-Use a GPU’教程内容翻译和内容结构编排,原文链接:Accelerator-Use a GPU目录创建环境(Setup)一、概览二、设备配置记录(Logging device placement)三、手动设备配置(Manual device placement)四、限制GPU内存增长(Limit...原创 2019-11-02 11:19:52 · 10346 阅读 · 7 评论 -
TensorFlow2.0 Guide官方教程 学习笔记18 -‘Distributed training with TensorFlow‘
本笔记参照TensorFlow官方教程,主要是对‘Distributed training with TensorFlow’教程内容翻译和内容结构编排,原文链接:Distributed training with TensorFlow目录一、概览二、策略类型2.1 镜像策略(MirroredStrategy)2.2 中心存储策略(CentralStorageStrategy)2.3 多...原创 2019-11-01 17:04:20 · 3083 阅读 · 2 评论 -
TensorFlow2.0 Guide官方教程 学习笔记17 -‘Using the SavedModel format‘
本笔记参照TensorFlow官方教程,主要是对‘Save a model-Training checkpoints’教程内容翻译和内容结构编排,原文链接:Using the SavedModel format目录一、用Keras创建‘已保存模型’(Creating a SavedModel form Keras)二、在TensorFlow Serving里运行一个‘已保存模型’(Saved...原创 2019-10-31 11:55:33 · 5887 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记16 -‘Training checkpoints‘
本笔记参照TensorFlow官方教程,主要是对‘Save a model-Training checkpoints’教程内容翻译和内容结构编排,原文链接:Training checkpoints目录创建环境(Setup)一、从tf.keras训练API保存(Saving from tf.keras training APIs)二、编写检查点(writing checkpoints)2....原创 2019-10-27 16:46:57 · 1287 阅读 · 1 评论 -
TensorFlow2.0 Guide官方教程 学习笔记15 -‘Better performance with tf.data‘
本笔记参照TensorFlow官方教程,主要是对‘Better performance with tf.data’教程内容翻译和内容结构编排,原文链接:Better performance with tf.data目录一、概率二、输入流水线架构三、性能优化3.1 流水线3.2 并行数据转换(Parallelize data transformation)3.3 并行数据提取(Para...原创 2019-10-27 14:27:19 · 1029 阅读 · 1 评论 -
TensorFlow2.0 Guide 官方教程 学习笔记14-‘tf.data: Build TensorFlow input pipelines‘
本笔记参照TensorFlow官方教程,主要是对‘tf.data: Build TensorFlow input pipelines’教程内容翻译和内容结构编排,原文链接:tf.data: Build TensorFlow input pipelines目录一、基本结构(Basic mechanics)1.1 数据集结构二、读取输入数据2.1 处理Numpy 数组(Consuming N...原创 2019-10-26 22:24:31 · 1380 阅读 · 0 评论 -
TensorFlow2.0 Guide 官方教程 学习笔记13- Ragged Tensors
本笔记参照TensorFlow官方教程,主要是对‘Ragged Tensors’教程内容翻译和内容结构编排,原文链接:Ragged Tensors目录创建环境(Setup)一、概率(Overview)1.1 我们能用不规则张量(ragged tensor)做什么1.2 创建一个不规则张量1.3 我们能在不规则张量里存储什么1.4 用例二、不规则张量:定义2.1 不规则和统一维度...原创 2019-10-24 21:08:07 · 4046 阅读 · 0 评论 -
TensorFlow2.0 Guide 官方教程 学习笔记12-TensorFlow variables
本笔记参照TensorFlow官方教程,主要是对‘Tensor’教程内容翻译和内容结构编排,原文链接:Variables目录一、创建变量二、使用变量2.1跟踪变量TensorFlow变量是能表示由程序操作的,共享的、持续时间长的状态的最好方法。变量是由‘tf.Variable’类控制的。‘tf.Variable’表示可以被张量上运行的操作改变的张量值。我们可以用特定的操作读取并修改张...原创 2019-10-28 15:35:31 · 543 阅读 · 0 评论 -
TensorFlow2.0 Guide 官方教程 学习笔记11- TensorFlow Tensor
本笔记参照TensorFlow官方教程,主要是对‘Tensor’教程内容翻译和内容结构编排,原文链接:Tensor目录一、秩(Rank)1.1 0级秩(Rank 0)1.2 1级秩(Rank 1)1.3 高层秩(Higher ranks)1.4 获取一个tf.Tensor对象的秩1.5指定tf.Tensor片(Referring to tf.Tensor slices)二、 形状(...原创 2019-10-22 17:50:15 · 379 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记10- Eager execution
本笔记参照TensorFlow官方教程,主要是对‘Eager execution’教程内容翻译和内容结构编排,原文链接:Eager execution目录一、创建环境和基本使用二、动态控制流三、即刻训练(Eager training)3.1计算梯度3.2训练一个模型3.3变量和优化器3.4基于对象保存(objec-based saving)3.5对象导向指标3.6总结和Tens...原创 2019-10-20 15:25:49 · 1222 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记9- Estimators
本笔记参照TensorFlow官方教程,主要是对‘Estimators’教程内容翻译和内容结构编排,原文链接:Estimators目录一、优势二、评估器的能力三、预制评估器(Pre-made Estimators)3.1预制评估器程序结构3.2预制评估器的好处四、定制评估器五、推荐工作流六、从Keras模型中创建一个评估器本篇笔记介绍高级TensorFlow API——tf....原创 2019-10-19 16:29:06 · 1509 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记8- Keras custom callbacks
本笔记参照TensorFlow官方教程,主要是对‘Keras custom callbacks’教程内容翻译和内容结构编排,原文链接:Keras custom callbacks目录创建环境(Setup)一、Keras callbacks介绍二、接受回调的模型方法三、回调方法概述3.1训练/测试/预测的通用方法3.2训练特定方法3.3使用日志字典四、Keras回调应用示例4.1...原创 2019-10-19 13:34:06 · 669 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记7- Masking and padding with Keras
本笔记参照TensorFlow官方教程,主要是对‘Recurrent Neural Networks (RNN) with Keras’教程内容翻译和内容结构编排,原文链接:Masking and padding with Keras目录创建环境(Setup)序列数据填充(Padding)掩码(Masking)掩码层(Mask-generating layers):嵌入和掩码功能API...原创 2019-10-18 21:07:33 · 943 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记6- Recurrent Neural Networks (RNN) with Keras
本笔记参照TensorFlow官方教程,主要是对‘Recurrent Neural Networks (RNN) with Keras’教程内容翻译和内容结构编排,原文链接:Recurrent Neural Networks (RNN) with Keras目录创建环境(Setup)一、创建一个简单的模型二、输出和状态三、RNN层和RNN单元(cells)四、Cross-batch状态...原创 2019-10-18 11:19:14 · 2281 阅读 · 0 评论 -
TensorFlow2.0 Guide 官方教程 学习笔记5- Save and serialize models with Keras
本笔记参照TensorFlow官方教程,主要是对‘Writing custom layers and models with Keras’教程内容翻译和内容结构编排,原文链接:Save and serialize models with Keras目录创建环境(Setup)第一部分:保存顺序模型或功能模型1.1保存整个模型1.2输出到已经保存的模型(Export to SavedMode...原创 2019-10-13 16:50:59 · 338 阅读 · 0 评论 -
TensorFlow2.0 Guide 官方教程 学习笔记4-Writing custom layers and models with Keras
本笔记参照TensorFlow官方教程,主要是对‘Writing custom layers and models with Keras’教程内容翻译和内容结构编排,原文链接:Writing custom layers and models with Keras目录创建环境(setup)一、层类1.1 层封装一个状态(权重)和一些计算1.2 最佳实践:延迟创建权重,直到知道输入的形状1...原创 2019-10-13 15:06:04 · 360 阅读 · 0 评论 -
TensorFlow2.0 Guide官方教程 学习笔记3-Keras-train and evaluate
本笔记参照TensorFlow官方教程,主要是对‘Keras-train and evaluate’(以下简称KFA)教程内容翻译和内容结构编排,原文链接:Keras-train and evaluate目录设置(Setup)第一部分:使用内置的training&evaluation循环1.1 API概率:第一个端到端例子1.2指定代价、指标和优化器1.2.1 许多内置优化器(...原创 2019-10-12 22:06:07 · 818 阅读 · 0 评论 -
TensorFlow2.0 Guide 官方教程 学习笔记2-Keras functional API
本笔记参照TensorFlow官方教程,主要是对‘Keras functional API’(以下简称KFA)教程内容翻译和内容结构编排原文链接:Keras Functional API目录1.导入TensorFlow库2.引言3.训练、评价、推断4.保存和序列化5.相同层图定义多个模型6.模型的可调用性7.控制复杂图层拓扑8.共享层9.提取和重用层图中的节点10.通过定制...原创 2019-10-07 22:11:01 · 838 阅读 · 0 评论 -
TensorFlow2.0 Guide 官方教程-学习笔记1-Keras overview
使用TensorFlow中Keras API接口训练模型的流程:1.导入相关库2.创建模型3.配置模型中的层4.设置模型的学习过程5.模型使用数据集进行训练6.模型的评价和预测7.模型的保存和恢复一、导入TensorFlow库,并使用Keras接口from __future__ import absolute_import, division, print_function, u...原创 2019-10-06 13:48:57 · 579 阅读 · 0 评论