Tips of Git
delete submodule
1 | $ git rm the_submodule |
ignore submodule
1 | $ echo "sub_repo/" >> .gitignore |
1 | $ git rm the_submodule |
1 | $ echo "sub_repo/" >> .gitignore |
1 | $ npm install hexo-deployer-git --save |
1 | $ hexo init <folder> |
修改站点配置文件_config.yml
1 | deploy: |
1 | $ hexo new [layout] <title> |
1 | $ hexo g |
1 | $ hexo s |
1 | $ hexo d |
1 | $ wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh |
if Statements 1
2
3
4
5
6if x < 0:
print("x < 0")
elif x == 0:
print("x==0")
else:
print("x > 0")
for Statements 1
2
3
4
5
6>>> for w in words[:]: # Loop over a slice copy of the entire list.
... if len(w) > 6:
... words.insert(0, w)
...
>>> words
['defenestrate', 'cat', 'window', 'defenestrate']
range() Function 1
2
3
4
5
6
7
8>>> for i in range(3):
... print(i)
...
0
1
2
>>> list(range(5))
[0, 1, 2, 3, 4]
break and continue Statements, and else Clauses on Loops The else Clauses is executed when the loop terminates through exhaustion of the list (with for) or when the condition becomes false (with while), but not when the loop is terminated by a break statement.
1 | >>> for n in range(2, 5): |
1 | >>> def fib(n): # write Fibonacci series up to n |
\[\boldsymbol a^l = \sigma(\boldsymbol z^l)\]
\[\boldsymbol z^l =\boldsymbol w^l\boldsymbol a^{l-1} + \boldsymbol b^l\]
non-vectored form
\[a_j^l = \sigma(z_j^l)\]
\[z_j^l =\sum_k w_{jk}^la_k^{l-1} + b_j^l\]
\[ \delta^l_j \equiv \frac{\partial C}{\partial z^l_j}\] 1
delta衡量的是对神经元输出激励值的误差
\[\boldsymbol \delta^L = \frac{\partial C}{\partial \boldsymbol a^L} \odot \sigma'(\boldsymbol z^L) = \nabla_a C \odot \sigma'(\boldsymbol z^L) \tag{1} \]
\[\boldsymbol \delta^l = ((\boldsymbol w^{l+1})^T \boldsymbol \delta^{l+1}) \odot \sigma'(\boldsymbol z^l) \tag{2}\]
\[ \frac{\partial C}{\partial b^l} = \delta^l \tag{3}\]
\[\frac{\partial C}{\partial w^l_{jk}} = \delta^l_j a^{l-1}_k \tag{4}\]
1 | a(in)是输⼊给权重w的神经元的激活值,δ(out)是输出⾃权重w的神经元的误差,那么代价函数对参数w的偏导如下: |
1 | 当j不等于k时,a(k)对z(j)偏导为0 |
\[\begin{align} \delta^l_j &= \frac{\partial C}{\partial z^l_j} \\ &= \frac{\partial C}{\partial a^l_j} \cdot \frac{\partial a^l_j}{\partial z^l_j} \\ &= \frac{\partial C}{\partial a^l_j} \sigma'(z^l_j) \\ &= \sum_k \frac{\partial C}{\partial z^{l+1}_k} \cdot \frac{\partial z^{l+1}_k}{\partial a^l_j} \cdot \sigma'(z^l_j) \\ &= \sum_k \delta^{l+1}_k w_{kj} \sigma'(z^l_j) \end{align}\]
\[\begin{align} \frac{\partial C}{\partial b^l_j} &= \frac{\partial C}{\partial z^l_j} \cdot \frac{\partial z^l_j}{\partial b^l_j} = \frac{\partial C}{\partial z^l_j} \cdot 1 = \delta^l_j \end{align}\]
1 | apt install dkms build-essential linux-headers-amd64(or linux-headers-$(uname -r)) |
disable nouveau module(optional)
1 | blacklist nouveau |
1 | update-initramfs -u |
execute installer
1 | service lightdm stop // service gdm3 stop |
1 | sh cuda_XX.run |
1 | // bios 安全登录问题 |
1 | export PERL5LIB=. |
1 | apt install gcc g++ make cmake cmake-curses-gui |
1 | add path "/usr/include/hdf5/serial/","/usr/lib/x86_64-linux-gnu/hdf5/serial/" in Makefile.config |
1 | vim cmake/Dependencies.cmake to append ${HDF5_HL_LIBRARIES} |
1 | ## compile glog manually |