【DeepDream】初学
source link: https://www.guofei.site/2018/11/14/deepdream.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
【DeepDream】初学
2018年11月14日Author: Guofei
文章归类: 2-5-CV ,文章编号: 270
版权声明:本文作者是郭飞。转载随意,但需要标明原文链接,并通知本人
原文链接:https://www.guofei.site/2018/11/14/deepdream.html
tensorflow 示例 上的讲解,比看过的几本书都要清晰(看的几本书都是从这里抄的,而且抄来抄去反而不太好看了)。
我的粗浅理解是这样的:
- 找到CNN中某个神经元(换句话说,某个CNN节点的某个channel)。合适的层叫做风格层,至于怎么找到的我还没搞清楚。总之越往上层的神经元,其处理的信息越抽象;越下层的神经元越细节。
- 对于输入的图片,我们想调整图片,使得上面那个神经元输出值最大(被激活)
- 用梯度来做这个事情,迭代中不断调整图片各个像素的值(梯度上升)。
下面是听吴恩达的课程后的笔记
Content(C)+Style(S)=Generated image G
J(G)=αJcontent(C,G)+βJstyle(S,G)J(G)=αJcontent(C,G)+βJstyle(S,G)
- initiate G randomly
- Use gradient descent to minJ(G)minJ(G)
- $J_{content}(C,G)=0.5 \mid \mid a^{l}-a^{l}\mid\mid^2$
- Jstyle(S,G)=∑lλ[l]J[l]style(S,G)Jstyle(S,G)=∑lλ[l]Jstyle[l](S,G)
- $J_{style}^{[l]}(S,G)=\dfrac{1}{(2n_H^{[l]}n_W^{[l]}n_C^{[l]})^2}\mid\mid G^{l}-G^{l} \mid\mid_F=\dfrac{1}{(2n_H^{[l]}n_W^{[l]}n_C^{[l]})^2}\sum\limits_k\sum\limits_{k’}(G_{kk’}^{l}-G_{kk’}^{l})$
- $G_{kk’}^{l}=\sum\limits_i\sum\limits_j a_{ijk}^{l}a_{ijk’}^{l}$
- $G_{kk’}^{l}=\sum\limits_i\sum\limits_j a_{ijk}^{l}a_{ijk’}^{l}$
tf实现
不同的是,这里用的是 vgg-19,预训练好的参数在这里下载 https://www.kaggle.com/teksab/imagenetvggverydeep19mat/downloads/imagenetvggverydeep19mat.zip/1
参考文献
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/tutorials/deepdream
https://github.com/hjptriplebee/deep_dream_tensorflow/blob/master/main.py
https://github.com/google/deepdream/blob/master/dream.ipynb
您的支持将鼓励我继续创作!
Recommend
-
117
初学机器学习的你,是否掌握了这样的Linux技巧?
-
118
Java - @Nick2VIPUser - 以前做过爬虫和 django 项目。现在在学习 javaWeb 开发。看了一下午的 struts,也从 Eclipse 用到 IntelliJ IDEA,被复杂的配置和环境弄晕了。
-
70
-
65
初学机器学习:直观解读KL散度的数学概念
-
64
初学Java,掌握一些注意事项,能帮助程序员更快的熟悉学习方法,在学习过程中少走弯路,学会最核心的技术,拿到理想的薪资,本文达妹为就为大家整理了Java学习的几个注意要点,相信一定对大家有帮助。 ...
-
90
概况 本次分析的样本来自,ISCC竞赛(http://www.isclab.org.cn/)移动逆向的赛题,作为本人的练手之作。本次分析过程中,主要通过IDA调试Dump出dex文...
-
48
程序员 - @wsds - windows 上,下载的 mingw 中的 g++编译的,看别人都是 makefile 编译的,搞不懂请教一下大家,初学的话,怎么编译自己写的代码?
-
7
项目网址: http://hiroharu-kato.com/projects_en/neural_renderer.html 代码网址:https://github.com/hiroharu-kato/neural_renderer 论文名称:N...
-
4
DeepDream From Wikipedia, the free encyclopedia Jump to navigation Jump to sea...
-
8
Discriminative models In a discriminative model, we draw conclusion on something we observe. For example, we train a CNN discriminative model to classify a picture. y=f(image)y
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK