Skip to content

Commit

Permalink
Merge branch 'serif'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanggyb committed Apr 9, 2017
2 parents 277a146 + 276336b commit 73c0d04
Show file tree
Hide file tree
Showing 18 changed files with 969 additions and 942 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ all: graphics $(TARGET)

$(TARGET): $(SOURCES) $(IMAGEDEPS)
$(TEX) $(basename $@)
$(MKIDX) $(basename $@)
# $(MKIDX) $(basename $@)
$(MKGLS) $(basename $@)
$(TEX) $(basename $@)
$(TEX) $(basename $@)
Expand Down
28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $ ./bootstrap.sh
This is a simple shell script to download the following free fonts into `fonts/` folder:

- [Google Noto Sans CJK SC](https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKsc-hinted.zip)
- [Google Roboto](https://github.com/google/roboto/releases/download/v2.134/roboto-unhinted.zip)
- [Google Noto Serif CJK SC](https://noto-website.storage.googleapis.com/pkgs/NotoSerifCJKsc-hinted.zip)
- [Adobe Source Serif Pro](https://github.com/adobe-fonts/source-serif-pro/archive/1.017R.zip)
- [Adobe Source Code Pro](https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip)

Expand All @@ -62,24 +62,13 @@ fonts/
├── NotoSansCJKsc-Thin.otf
├── NotoSansMonoCJKsc-Bold.otf
├── NotoSansMonoCJKsc-Regular.otf
├── Roboto-Black.ttf
├── Roboto-BlackItalic.ttf
├── Roboto-Bold.ttf
├── Roboto-BoldItalic.ttf
├── Roboto-Italic.ttf
├── Roboto-Light.ttf
├── Roboto-LightItalic.ttf
├── Roboto-Medium.ttf
├── Roboto-MediumItalic.ttf
├── Roboto-Regular.ttf
├── Roboto-Thin.ttf
├── Roboto-ThinItalic.ttf
├── RobotoCondensed-Bold.ttf
├── RobotoCondensed-BoldItalic.ttf
├── RobotoCondensed-Italic.ttf
├── RobotoCondensed-Light.ttf
├── RobotoCondensed-LightItalic.ttf
├── RobotoCondensed-Regular.ttf
├── NotoSerifCJKsc-Black.otf
├── NotoSerifCJKsc-Bold.otf
├── NotoSerifCJKsc-DemiLight.otf
├── NotoSerifCJKsc-Light.otf
├── NotoSerifCJKsc-Medium.otf
├── NotoSerifCJKsc-Regular.otf
├── NotoSerifCJKsc-Thin.otf
├── SourceCodePro-Black.otf
├── SourceCodePro-BlackIt.otf
├── SourceCodePro-Bold.otf
Expand Down Expand Up @@ -115,3 +104,4 @@ $ make
to typeset and generate the PDF document. Or use your favorite GUI TeX
application, but choose `XeLaTeX` as the typeset engine to support the chinese
fonts.

18 changes: 10 additions & 8 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh

NOTO_SANS_CJKSC_URL="https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKsc-hinted.zip"
ROBOTO_URL="https://github.com/google/roboto/releases/download/v2.134/roboto-unhinted.zip"
SOURCE_SERIF_PRO_URL="https://github.com/adobe-fonts/source-serif-pro/archive/1.017R.zip"
NOTO_SERIF_CJKSC_URL="https://noto-website.storage.googleapis.com/pkgs/NotoSerifCJKsc-hinted.zip"
SOURCE_SERIF_PRO_URL="https://github.com/adobe-fonts/source-serif-pro/archive/2.000R.zip"
SOURCE_CODE_PRO_URL="https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip"

SYSTEM=`uname -s`
Expand All @@ -23,25 +23,27 @@ trap "{ cd -; rm -rf $TMPDIR; exit 255; }" INT
cd $TMPDIR # switch to temp dir
echo "Change to ${TMPDIR}"

# Get NotoSans
# Get Noto Sans
filename=$(basename ${NOTO_SANS_CJKSC_URL})
wget ${NOTO_SANS_CJKSC_URL}
unzip $filename
cp -f *.otf ${FONTDIR}
rm -rf $TMPDIR/*

# Get Roboto
filename=$(basename ${ROBOTO_URL})
folder=${filename%.zip}
wget ${ROBOTO_URL}
# Get Noto Serif
filename=$(basename ${NOTO_SERIF_CJKSC_URL})
wget ${NOTO_SERIF_CJKSC_URL}
unzip $filename
cp -f ${folder}/*.ttf ${FONTDIR}
cp -f *.otf ${FONTDIR}
rm -rf $TMPDIR/*

# Get Source Serif Pro
filename=$(basename ${SOURCE_SERIF_PRO_URL})
folder="source-serif-pro-${filename%.zip}"
wget ${SOURCE_SERIF_PRO_URL}
unzip $filename
cp -f ${folder}/OTF/*.otf ${FONTDIR}
rm -rf $TMPDIR/*

# Get Source Code Pro
filename=$(basename ${SOURCE_CODE_PRO_URL})
Expand Down
60 changes: 30 additions & 30 deletions chap1.tex

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions chap2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ \section{热身:神经网络中使用矩阵快速计算输出的方法}

在使用方程~\eqref{eq:25} 计算 $a^l$ 的过程中,我们计算了中间量 $z^l \equiv w^l
a^{l-1}+b^l$。这个量其实是非常有用的:我们称 $z^l$$l$ 层神经元的\textbf{带权
输入}\index{带权输入}。在本章后面,我们会充分利用带权输入 $z^l$。方
输入}。在本章后面,我们会充分利用带权输入 $z^l$。方
程~\eqref{eq:25} 有时候会以带权输入的形式写作 $a^l = \sigma(z^l)$。同样要指出的
$z^l$ 的每个元素是 $z^l_j = \sum_k w^l_{jk} a^{l-1}_k+b^l_j$,其实 $z^l_j$
是第 $l$ 层第 $j$ 个神经元的激活函数的带权输入。
Expand Down Expand Up @@ -353,8 +353,7 @@ \section{反向传播的四个基本方程}
\hyperref[fig:StepFunction]{上一章中S型函数的图形},当 $\sigma(z^L_j)$ 近似为$0$
或者 $1$ 的时候 $\sigma$ 函数变得非常平。这时 $\sigma'(z^L_j) \approx 0$。所以如
果输出神经元处于或者低激活值($\approx 0$)或者高激活值($\approx 1$)时,最终层
\gls*{weight}学习缓慢。这样的情形,我们常常称输出神经元已经\textbf{饱和}\index{饱
和}了,并且,\gls*{weight}学习也会终止(或者学习非常缓慢)。类似的结果对于输出
\gls*{weight}学习缓慢。这样的情形,我们常常称输出神经元已经\textbf{饱和}了,并且,\gls*{weight}学习也会终止(或者学习非常缓慢)。类似的结果对于输出
神经元的\gls*{bias}也是成立的。

针对前面的层,我们也有类似的观点。特别地,注意在~\eqref{eq:bp2} 中的项
Expand All @@ -380,7 +379,7 @@ \section{反向传播的四个基本方程}
\begin{minipage}{0.7\textwidth}
\begin{framed}
\centering
\textbf{总结:\gls*{bp}的四个方程式}\index{\gls*{bp}的四个方程式}\label{backpropsummary}\\
\textbf{总结:\gls*{bp}的四个方程式}\label{backpropsummary}\\
\vspace{1.5ex}
\begin{tabular}{ll}
$\delta^L = \nabla_a C \odot \sigma'(z^L)$ & \hspace{2cm}\eqref{eq:bp1} \\[1.5ex]
Expand Down Expand Up @@ -424,7 +423,7 @@ \section{四个基本方程的证明(可选)}
\label{sec:proof_of_the_four_fundamental_equations}

我们现在证明这四个基本的方程 \eqref{eq:bp1}--\eqref{eq:bp4}。所有这些都是多元微
积分的\href{https://en.wikipedia.org/wiki/Chain_rule}{链式法则}\index{链式法则}%
积分的\href{https://en.wikipedia.org/wiki/Chain_rule}{链式法则}%
的推论。如果你熟悉链式法则,那么我鼓励你在读之前尝试自己推导。

让我们从方程~\eqref{eq:bp1} 开始,它给出了输出误差 $\delta^L$ 的表达式。为了证明
Expand Down
Loading

0 comments on commit 73c0d04

Please sign in to comment.