↓ 跳过正文
  1. Posts/

反向传播学习笔记

·214 字·1 分钟

先说下自己目前很笼统的理解:

反向传播是用来快速计算梯度的一种方法;

过程大概是把计算过程用计算图表示,这样每一个中间步骤都有一个节点,每一个local gradient都会比较容易计算;

思想涉及 chain rule + 计算图 + 记忆化

因为计算不同自变量的偏导数会存在很多共同路径,这部分就只计算了一次,因此可以加快计算速度。

所以核心的东西大概是两点:

1  * 用计算图表示计算,局部gradient 替代繁琐的微积分计算
2  * 共同部分只计算一次,类似一个记忆化。

相关文章

tensorflow input pipline 学习笔记

·2065 字·5 分钟
参考资料: tf_doc_Reading data TENSORFLOW INPUT PIPELINE EXAMPLE tensorflow:理解tensorflow中的输入管道 第二个参考资料是第一个的翻译版本,翻译的水平一般,建议看原文,不是很长。 下面是我挑了文章中重点的部分+自己的理解。 TL;DR; # 一个适用于不是很大的数据集的pipeline input 的例子。

tensorflow 合并模型

·1696 字·4 分钟
在这里存个备份,还有些问题没有解决。 raise ValueError(“GraphDef cannot be larger than 2GB.”) 记录一些思路好了。现在是没有生成.meta文件,爆掉应该是因为所有的变量都加载到了默认图里。 也就是说我处理完checkpoint 0 之后开始处理checkpoint1,但是checkpoint0的那些变量还是存在的…所以越来越多?

tensorflow checkpoint 学习笔记

·513 字·2 分钟
参考资料: What is the TensorFlow checkpoint meta file? TensorFlow: Restoring variables from from multiple checkpoints 合并模型的时候发现.meta一直在累加,而其他数据文件没有改变。因此来探究一下checkpoint的几个文件的含义。 This file contains a serialized MetaGraphDef protocol buffer. The MetaGraphDef is designed as a serialization format that includes all of the information required to restore a training or inference process (including the GraphDef that describes the dataflow, and additional annotations that describe the variables, input pipelines, and other relevant information). For example, the MetaGraphDef is used by TensorFlow Serving to start an inference service based on your trained model. We are investigating other tools that could use the MetaGraphDef for training.

tensorflow variable 学习笔记

·3204 字·7 分钟
参考资料: programmers_guide/variables tf/Variable 之前感觉对tensorflow 的variable的理解不是很深刻…跑个模型啥的倒不会有什么问题,但是涉及分布式,模型并行之类的,感觉有些地方还是要理解得仔细一点比较好。

tensorflow Session 学习笔记

·439 字·1 分钟
tensorflow-session官方文档 说下我自己的理解: session中文一般叫会话,可以理解成op执行时候需要的一层虚拟化的封装。 op必须在session中才能执行。 tensor也是在tensor中才可以存在(tf.variable和tensor几乎是一回事,只是tf.variable的会话不要求session,也可以理解成tf.variable在session中就成了tensor.