Feb 5, 2018 · 493 words · 1 min
先粗略读了2遍orz.可能不够严谨,先写一些high-level的理解。
对于序列或者图片数据,如果想获得一个long-range的依赖,通常的做法是循环神经网络(对于序列)或者深层的卷积神经网络(对于图片数据)
Jan 25, 2018 · 436 words · 1 min
终于忙完学校的事情可以干正事了orz
这里会记录一些第一遍看paper的过程中遇到的一些影响理解的概念,不过大多不会深究,只算做粗浅的理解。
1、高斯金字塔:
高斯金字塔是最基本的图像塔。首先将原图像作为最底层图像G0(高斯金字塔的第0层),利用高斯核(5*5)对其进行卷积,然后对卷积后的图像进行下采样(去除偶数行和列)得到上一层图像G1,将此图像作为输入,重复卷积和下采样操作得到更上一层图像,反复迭代多次,形成一个金字塔形的图像数据结构,即高斯金字塔。
Nov 26, 2017 · 571 words · 2 mins
先记录一下PCA实战需要用到的安装包(arch下,python2环境) # python2-scikit-learn # python2-numpy
python2-pandas
python2-matplotlib
python2-seaborn
pandas.DataFrame
pandas 数据结构介绍
Sep 5, 2017 · 214 words · 1 min
先说下自己目前很笼统的理解:
反向传播是用来快速计算梯度的一种方法;
过程大概是把计算过程用计算图表示,这样每一个中间步骤都有一个节点,每一个local gradient都会比较容易计算;
Aug 24, 2017 · 2065 words · 5 mins
参考资料:
tf_doc_Reading data
TENSORFLOW INPUT PIPELINE EXAMPLE
tensorflow:理解tensorflow中的输入管道
第二个参考资料是第一个的翻译版本,翻译的水平一般,建议看原文,不是很长。
下面是我挑了文章中重点的部分+自己的理解。
TL;DR; # 一个适用于不是很大的数据集的pipeline input 的例子。
Aug 21, 2017 · 1696 words · 4 mins
在这里存个备份,还有些问题没有解决。
raise ValueError(“GraphDef cannot be larger than 2GB.”)
记录一些思路好了。现在是没有生成.meta文件,爆掉应该是因为所有的变量都加载到了默认图里。
也就是说我处理完checkpoint 0 之后开始处理checkpoint1,但是checkpoint0的那些变量还是存在的…所以越来越多?
Aug 21, 2017 · 513 words · 2 mins
参考资料:
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.
Aug 20, 2017 · 3204 words · 7 mins
参考资料:
programmers_guide/variables
tf/Variable
之前感觉对tensorflow 的variable的理解不是很深刻…跑个模型啥的倒不会有什么问题,但是涉及分布式,模型并行之类的,感觉有些地方还是要理解得仔细一点比较好。
Aug 20, 2017 · 439 words · 1 min
tensorflow-session官方文档
说下我自己的理解:
session中文一般叫会话,可以理解成op执行时候需要的一层虚拟化的封装。
op必须在session中才能执行。
tensor也是在tensor中才可以存在(tf.variable和tensor几乎是一回事,只是tf.variable的会话不要求session,也可以理解成tf.variable在session中就成了tensor.
Aug 14, 2017 · 211 words · 1 min
是在使用分布式tensorflow遇到的一个错误
报错如下:
InvalidArgumentError (see above for traceback): Cannot assign a device for operation ‘save/Rest│| 2 GeForce GTX 1080 On | 0000:08:00.0 Off | N/A | oreV2_888’: Operation was explicitly assigned to /job:worker/task:0/device:CPU:0 but available │| 24% 39C P8 12W / 180W | 0MiB / 8114MiB | 0% Default | devices are [ /job:localhost/replica:0/task:0/cpu:0, /job:localhost/replica:0/task:0/gpu:0 ]. Make sure the device specification refers to a valid device.
Aug 7, 2017 · 1758 words · 4 mins
感觉资料不是很多,先收集资料好了。
tf-distributed官网文档
SO-between-graph和in-graph的区别
inception.README.md
SyncReplicasOptimizer
SO_How does ps work in distribute Tensorflow?
update:在多个nodes(机)上跑。。。tf默认是异步更新的。。。同步的话。。大概需要syncreplicasoptimizer?
Aug 4, 2017 · 944 words · 2 mins
update:supervisor的缺点是遇到问题只会抛异常,所以现在有一个better的管理工具,MonitoredSession
master,chief worker,Supervisor 这几个概念有点搞不清(我最菜.jpg 因此来学习一下。
概述 # 原生的tensorflow 是各种东西都需要自己手动,如果是小规模的训练问题倒是不大,但是如果是训练的数据量比较大,可能需要训练几天或者几个月。。。
Aug 3, 2017 · 440 words · 1 min
其实这算法巨简单。。。。让我想到了均分纸牌(noip200?
还是大致说一下:
对于有 features 但是 **没有 **labels 的数据,没办法用监督学习,但是可以使用非监督学习的聚类算法。
所谓聚类,简单理解,就是把相似的分成一组。。。
Aug 2, 2017 · 2722 words · 6 mins
Adding a New Op # * [目录](https://www.tensorflow.org/extend/adding_an_op#top_of_page) * [定义运算的接口](https://www.tensorflow.org/extend/adding_an_op#define_the_ops_interface) * [实现运算的核心部分(kernels)](https://www.tensorflow.org/extend/adding_an_op#implement_the_kernel_for_the_op) * [多线程cpu kernels](https://www.tensorflow.org/extend/adding_an_op#multi-threaded_cpu_kernels) * [GPU kernels](https://www.tensorflow.org/extend/adding_an_op#gpu_kernels) * [构建运算库](https://www.tensorflow.org/extend/adding_an_op#build_the_op_library) * [用系统编译器编译你的运算(TensorFlow binary installation)](https://www.tensorflow.org/extend/adding_an_op#compile_the_op_using_your_system_compiler_tensorflow_binary_installation) * [使用bazel编译你的运算(TensorFlow source installation)](https://www.tensorflow.org/extend/adding_an_op#compile_the_op_using_bazel_tensorflow_source_installation) * [在 Python 中使用你的运算](https://www.tensorflow.org/extend/adding_an_op#use_the_op_in_python) * [验证你添加的运算可以工作](https://www.tensorflow.org/extend/adding_an_op#verify_that_the_op_works) * [在你的运算中添加高级特性](https://www.tensorflow.org/extend/adding_an_op#building_advanced_features_into_your_op) * [条件检查和验证](https://www.tensorflow.org/extend/adding_an_op#conditional_checks_and_validation) * [Op registration](https://www.tensorflow.org/extend/adding_an_op#op_registration) * [GPU Support](https://www.tensorflow.org/extend/adding_an_op#gpu_support) * [用python 实现梯度](https://www.tensorflow.org/extend/adding_an_op#implement_the_gradient_in_python) * [Shape functions in C++](https://www.tensorflow.org/extend/adding_an_op#shape_functions_in_c) 对于要添加原生tensorflow中没有定义的运算的需求,首先建议在python层面,能不能将需要的op用其他原生的op拼凑起来。
Aug 2, 2017 · 479 words · 1 min
昨天pinduoduo笔试遇到了,看心情蒙的2333,来学习一下
** 峰度(Kurtosis)和偏度(Skewness)**
重点:正态分布的峰度和偏度都是0
峰度是描述总体中所有取值分布形态陡缓程度的统计量。这个统计量需要与正态分布相比较,峰度为0表示该总体数据分布与正态分布的陡缓程度相同;峰度大于0表示该总体数据分布与正态分布相比较为陡峭,为尖顶峰;峰度小于0表示该总体数据分布与正态分布相比较为平坦,为平顶峰。峰度的绝对值数值越大表示其分布形态的陡缓程度与正态分布的差异程度越大。
Aug 1, 2017 · 2016 words · 5 mins
这篇文章不会涉及tensorflow的具体使用,而是专注于介绍tensorflow的架构,目的是让开发者能够对tensorflow现有框架进行自定义的扩展。
tensorflow被设计用来处理大规模分布式训练,但是也足够灵活去处理新的machine learning模型或是系统层面的优化。
Jul 31, 2017 · 761 words · 2 mins
参考资料: # 维基百科_长短期记忆(LSTM)
Understanding LSTM Networks
[译] 理解 LSTM 网络
LSTM笔记
翻译的比较一般,建议看原文….比如cell还是不要翻译成【细胞】比较好吧…让人以为和生物学的【细胞】有什么关系呢orz
Jul 22, 2017 · 2596 words · 6 mins
其实我觉得这部分可以直接黑箱。。。直接无脑上Leaky ReLU或者Maxout?不过对这些激活函数的特点有个high-level的了解应该总是没坏处的,只要别太纠结细节就好了吧。。 # 每个激活函数(或非线性函数)的输入都是一个数字,然后对其进行某种固定的数学操作。下面是在实践中可能遇到的几种激活函数:
Jul 19, 2017 · 662 words · 2 mins
想要修改tensorflow-slim 中 nets中的某个model,例如命名为kk_v2.py
观察到train_image_classifier.py中调用模型的部分
Jul 18, 2017 · 6449 words · 13 mins
原始论文
翻译链接
**——前言:**作者认为残差连接在训练深度卷积模型时是很有必要的。至少在图像识别上,我们的研究似乎并不支持这一观点。
摘要: 近年来,深度卷积神经网络对图像识别性能的巨大提升发挥着关键作用。以Inception网络为例,其以相对较低的计算代价取得出色的表现。最近,与传统结构相结合的残差连接网络在2015ILSVRC挑战赛上取得非常优异的成绩;它的性能跟最新的Inception-v3 网络非常接近。因此也就引出了结合残差连接的Inception结构能否对性能进行提高的问题。本文给出实验证明,残差连接可以明显加速Inception网络的训练。同时实验也证明,相比没有残差连接的消耗相似的Inception网络,残差Inception网络在性能上具有微弱的优势。针对是否包含残差连接的Inception网络,本文同时提出了一些新的简化网络。这些网络的变体在ILSVRC2012分类任务上很明显的改善了单一框架的识别性能。本文进一步展示了适当的激活缩放如何使得很宽的残差Inception网络的训练更加稳定。本文通过对三个残差和一个Inception-v4进行组合,在top-5错误率上达到了 3.08%。