-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.xml
108 lines (51 loc) · 24.4 KB
/
search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>hexo博客小白搭建方法</title>
<link href="/2020/06/17/hexoblog/"/>
<url>/2020/06/17/hexoblog/</url>
<content type="html"><![CDATA[<p>记录利用hexo搭建博客时候的一些关键步骤,网上有很多类似的博客。我主要介绍我遇到的一些问题</p><h2 id="如何在博客中插入图片?"><a href="#如何在博客中插入图片?" class="headerlink" title="如何在博客中插入图片?"></a>如何在博客中插入图片?</h2><p>我博客的根目录是blog,在blog的public\medias目录下放入自己的图片。比如我有一张1.jpg文件</p><p>然后用![ ]( / medias / 1.jpg)使用它(去掉空格)</p><h2 id="取消首页渐变颜色动画"><a href="#取消首页渐变颜色动画" class="headerlink" title="取消首页渐变颜色动画"></a>取消首页渐变颜色动画</h2><p>在themes\Matery\source\css\matery.css,ctrl+F快捷键查找.bg-cover:after,注释掉即可。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">/* .bg-cover:after {</span><br><span class="line"> -webkit-animation: rainbow 60s infinite;</span><br><span class="line"> animation: rainbow 60s infinite;</span><br><span class="line">} */</span><br></pre></td></tr></table></figure><h2 id="更改首页中个人信息"><a href="#更改首页中个人信息" class="headerlink" title="更改首页中个人信息"></a>更改首页中个人信息</h2><p>如下图,matery主题中的个人信息部分是作者的信息。</p><p><img src="/medias/hexo-1.jpg?100x100" alt=""></p><p>在blog\themes\hexo-theme-matery目录找到配置文件_config.yml,检索indexbtn和socialLink将其中的部分更改成个人信息就可以了。</p><h2 id="参考文献"><a href="#参考文献" class="headerlink" title="参考文献"></a>参考文献</h2><p>[1] <a href="https://blog.csdn.net/cungudafa/article/details/106278206" target="_blank" rel="noopener">https://blog.csdn.net/cungudafa/article/details/106278206</a><br>[2] <a href="https://www.jianshu.com/p/b926ecf1c6f6" target="_blank" rel="noopener">https://www.jianshu.com/p/b926ecf1c6f6</a><br>[3] <a href="https://zhuanlan.zhihu.com/p/35668237" target="_blank" rel="noopener">https://zhuanlan.zhihu.com/p/35668237</a></p>]]></content>
</entry>
<entry>
<title>caffe源码阅读之caffe(二)</title>
<link href="/2020/06/15/caffe-source-code-reading2/"/>
<url>/2020/06/15/caffe-source-code-reading2/</url>
<content type="html"><![CDATA[<h1 id="caffe的模块"><a href="#caffe的模块" class="headerlink" title="caffe的模块"></a>caffe的模块</h1><p>layer、net、blob</p><h1 id=""><a href="#" class="headerlink" title=""></a></h1>]]></content>
<categories>
<category> 深度学习 </category>
</categories>
<tags>
<tag> 深度学习框架 </tag>
</tags>
</entry>
<entry>
<title>caffe源码阅读之源码安装caffe(一)</title>
<link href="/2020/06/12/caffe-source-code-reading/"/>
<url>/2020/06/12/caffe-source-code-reading/</url>
<content type="html"><![CDATA[<p>作为一个tf boy,日常面对的就是各种深度学习框架,为了弄清楚它们运行的原理,本文从caffe这种比较简单的深度学习框架开始探究它们的运行原理。最终学习pytorch的运行的原理。</p><h1 id="caffe的linux安装"><a href="#caffe的linux安装" class="headerlink" title="caffe的linux安装"></a>caffe的linux安装</h1><p>由于windows上的安装比较麻烦,为了简化学习的成本,我选择在linux上安装caffe。我用的是Debian系统,按照参考文献[1]的步骤来,可以安装成功。</p><p>我主要补充下面几点</p><h1 id="安装过程的一些解释"><a href="#安装过程的一些解释" class="headerlink" title="安装过程的一些解释"></a>安装过程的一些解释</h1><p>如果没有安装cmake,需要先安装一下cmake,命令如下:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install cmake</span><br></pre></td></tr></table></figure><p>make命令的含义:<br>构建、编译</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">make all # 编译所有目标文件</span><br><span class="line">make test # 编译test文件</span><br><span class="line">make runtest # 编译runtest文件</span><br></pre></td></tr></table></figure><p>关于gfortran:<br>gfortran是GCC中的GNU Fortran编译器。从GCC4.0版开始,gfortran取代了g77成为GCC中的fortran编译器。</p><p>gfortran目前仍在开发中,gfortran支持fortran77 90 95语法,部分支持fortran200X语法。</p><p>virtual memory exhausted: Cannot allocate memory错误的处理:<br><img src="/medias/deeplearning/caffe1.png" alt=""></p><p>这是由于我是用的云上虚拟机,没有配置虚拟内存。参考[2]配置下虚拟内存就好了,里面的free命令是linux的一个资源监控工具,主要监控内存、物理存储的。</p><p>更多虚拟内存的知识,可以看看[3],这篇博客讲解的比较详细。</p><p>free命令:<br><a href="https://www.cnblogs.com/peida/archive/2012/12/25/2831814.html" target="_blank" rel="noopener">https://www.cnblogs.com/peida/archive/2012/12/25/2831814.html</a></p><h1 id="caffe运行minist手写识别的例子、"><a href="#caffe运行minist手写识别的例子、" class="headerlink" title="caffe运行minist手写识别的例子、"></a>caffe运行minist手写识别的例子、</h1><p>源码安装caffe后,为了一探它运行的原理,我们首先看一下caffe是如何跑通一个深度学习程序的。在源码examples/mnist文件下有手写识别的例子。<br>根据相关介绍。caffe运行一个程序需要配置两个prototxt文件,一个是定义网络的,一个是定义超参数,比如学习器、迭代次数这些参数。比如用lenet跑手写识别,<br>首先可以定义一个lenet.prototxt,这个文件定义了网络长啥样,内容如下:</p><h1 id="定义网络结构"><a href="#定义网络结构" class="headerlink" title="定义网络结构"></a>定义网络结构</h1><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br></pre></td><td class="code"><pre><span class="line">name: "LeNet"</span><br><span class="line">layer {</span><br><span class="line"> name: "data"</span><br><span class="line"> type: "Input"</span><br><span class="line"> top: "data"</span><br><span class="line"> input_param { shape: { dim: 64 dim: 1 dim: 28 dim: 28 } }</span><br><span class="line">}</span><br><span class="line">layer {</span><br><span class="line"> name: "conv1"</span><br><span class="line"> type: "Convolution"</span><br><span class="line"> bottom: "data"</span><br><span class="line"> top: "conv1"</span><br><span class="line"> param {</span><br><span class="line"> lr_mult: 1</span><br><span class="line"> }</span><br><span class="line"> param {</span><br><span class="line"> lr_mult: 2</span><br><span class="line"> }</span><br><span class="line"> convolution_param {</span><br><span class="line"> num_output: 20</span><br><span class="line"> kernel_size: 5</span><br><span class="line"> stride: 1</span><br><span class="line"> weight_filler {</span><br><span class="line"> type: "xavier"</span><br><span class="line"> }</span><br><span class="line"> bias_filler {</span><br><span class="line"> type: "constant"</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">layer {</span><br><span class="line"> name: "pool1"</span><br><span class="line"> type: "Pooling"</span><br><span class="line"> bottom: "conv1"</span><br><span class="line"> top: "pool1"</span><br><span class="line"> pooling_param {</span><br><span class="line"> pool: MAX</span><br><span class="line"> kernel_size: 2</span><br><span class="line"> stride: 2</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">layer {</span><br><span class="line"> name: "conv2"</span><br><span class="line"> type: "Convolution"</span><br><span class="line"> bottom: "pool1"</span><br><span class="line"> top: "conv2"</span><br><span class="line"> param {</span><br><span class="line"> lr_mult: 1</span><br><span class="line"> }</span><br><span class="line"> param {</span><br><span class="line"> lr_mult: 2</span><br><span class="line"> }</span><br><span class="line"> convolution_param {</span><br><span class="line"> num_output: 50</span><br><span class="line"> kernel_size: 5</span><br><span class="line"> stride: 1</span><br><span class="line"> weight_filler {</span><br><span class="line"> type: "xavier"</span><br><span class="line"> }</span><br><span class="line"> bias_filler {</span><br><span class="line"> type: "constant"</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">layer {</span><br><span class="line"> name: "pool2"</span><br><span class="line"> type: "Pooling"</span><br><span class="line"> bottom: "conv2"</span><br><span class="line"> top: "pool2"</span><br><span class="line"> pooling_param {</span><br><span class="line"> pool: MAX</span><br><span class="line"> kernel_size: 2</span><br><span class="line"> stride: 2</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">layer {</span><br><span class="line"> name: "ip1"</span><br><span class="line"> type: "InnerProduct"</span><br><span class="line"> bottom: "pool2"</span><br><span class="line"> top: "ip1"</span><br><span class="line"> param {</span><br><span class="line"> lr_mult: 1</span><br><span class="line"> }</span><br><span class="line"> param {</span><br><span class="line"> lr_mult: 2</span><br><span class="line"> }</span><br><span class="line"> inner_product_param {</span><br><span class="line"> num_output: 500</span><br><span class="line"> weight_filler {</span><br><span class="line"> type: "xavier"</span><br><span class="line"> }</span><br><span class="line"> bias_filler {</span><br><span class="line"> type: "constant"</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">layer {</span><br><span class="line"> name: "relu1"</span><br><span class="line"> type: "ReLU"</span><br><span class="line"> bottom: "ip1"</span><br><span class="line"> top: "ip1"</span><br><span class="line">}</span><br><span class="line">layer {</span><br><span class="line"> name: "ip2"</span><br><span class="line"> type: "InnerProduct"</span><br><span class="line"> bottom: "ip1"</span><br><span class="line"> top: "ip2"</span><br><span class="line"> param {</span><br><span class="line"> lr_mult: 1</span><br><span class="line"> }</span><br><span class="line"> param {</span><br><span class="line"> lr_mult: 2</span><br><span class="line"> }</span><br><span class="line"> inner_product_param {</span><br><span class="line"> num_output: 10</span><br><span class="line"> weight_filler {</span><br><span class="line"> type: "xavier"</span><br><span class="line"> }</span><br><span class="line"> bias_filler {</span><br><span class="line"> type: "constant"</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">layer {</span><br><span class="line"> name: "prob"</span><br><span class="line"> type: "Softmax"</span><br><span class="line"> bottom: "ip2"</span><br><span class="line"> top: "prob"</span><br><span class="line">}</span><br></pre></td></tr></table></figure><h1 id="定义网络参数"><a href="#定义网络参数" class="headerlink" title="定义网络参数"></a>定义网络参数</h1><p>定义完网络后,网路的训练还需要一些配置,取名lenet_solver.prototxt,内容如下</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"># The train/test net protocol buffer definition</span><br><span class="line">net: "examples/mnist/lenet.prototxt"</span><br><span class="line"># test_iter specifies how many forward passes the test should carry out.</span><br><span class="line"># In the case of MNIST, we have test batch size 100 and 100 test iterations,</span><br><span class="line"># covering the full 10,000 testing images.</span><br><span class="line">test_iter: 100</span><br><span class="line"># Carry out testing every 500 training iterations.</span><br><span class="line">test_interval: 500</span><br><span class="line"># The base learning rate, momentum and the weight decay of the network.</span><br><span class="line">base_lr: 0.01</span><br><span class="line">momentum: 0.9</span><br><span class="line">weight_decay: 0.0005</span><br><span class="line"># The learning rate policy</span><br><span class="line">lr_policy: "inv"</span><br><span class="line">gamma: 0.0001</span><br><span class="line">power: 0.75</span><br><span class="line"># Display every 100 iterations</span><br><span class="line">display: 100</span><br><span class="line"># The maximum number of iterations</span><br><span class="line">max_iter: 10000</span><br><span class="line"># snapshot intermediate results</span><br><span class="line">snapshot: 5000</span><br><span class="line">snapshot_prefix: "examples/mnist/lenet"</span><br><span class="line"># solver mode: CPU or GPU</span><br><span class="line">solver_mode: GPU</span><br></pre></td></tr></table></figure><h1 id="运行"><a href="#运行" class="headerlink" title="运行"></a>运行</h1><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./build/tools/caffe train --solver=examples/mnist/lenet_solver.prototxt</span><br></pre></td></tr></table></figure><p>总结:本节讲了caffe的源码安装以及caffe的程序实例,下节讲述caffe是怎么跑起来这些程序的,也就是caffe的原理。</p><h1 id="参考文献"><a href="#参考文献" class="headerlink" title="参考文献"></a>参考文献</h1><p>[1] <a href="https://blog.csdn.net/pangyunsheng/article/details/79418896?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase" target="_blank" rel="noopener">https://blog.csdn.net/pangyunsheng/article/details/79418896?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase</a><br>[2] <a href="https://www.cnblogs.com/chenpingzhao/p/4820814.html" target="_blank" rel="noopener">https://www.cnblogs.com/chenpingzhao/p/4820814.html</a><br>[3] <a href="https://juejin.im/post/5c7fb7e9f265da2dcf62ad43" target="_blank" rel="noopener">https://juejin.im/post/5c7fb7e9f265da2dcf62ad43</a></p>]]></content>
<categories>
<category> 深度学习 </category>
</categories>
<tags>
<tag> 深度学习框架 </tag>
</tags>
</entry>
<entry>
<title>bert</title>
<link href="/2020/06/10/bert/"/>
<url>/2020/06/10/bert/</url>
<content type="html"><![CDATA[<p>测试博客效果</p>]]></content>
</entry>
<entry>
<title>Hello World</title>
<link href="/2020/06/09/hello-world/"/>
<url>/2020/06/09/hello-world/</url>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html" target="_blank" rel="noopener">Deployment</a></p>]]></content>
<categories>
<category> Hexo </category>
</categories>
<tags>
<tag> 博客 </tag>
</tags>
</entry>
</search>