Contribution instructions

$$\gdef \sam #1 {\mathrm{softargmax}(#1)}$$ $$\gdef \vect #1 {\boldsymbol{#1}} $$ $$\gdef \matr #1 {\boldsymbol{#1}} $$ $$\gdef \E {\mathbb{E}} $$ $$\gdef \V {\mathbb{V}} $$ $$\gdef \R {\mathbb{R}} $$ $$\gdef \N {\mathbb{N}} $$ $$\gdef \relu #1 {\texttt{ReLU}(#1)} $$ $$\gdef \D {\,\mathrm{d}} $$ $$\gdef \deriv #1 #2 {\frac{\D #1}{\D #2}}$$ $$\gdef \pd #1 #2 {\frac{\partial #1}{\partial #2}}$$ $$\gdef \set #1 {\left\lbrace #1 \right\rbrace} $$ % My colours $$\gdef \aqua #1 {\textcolor{8dd3c7}{#1}} $$ $$\gdef \yellow #1 {\textcolor{ffffb3}{#1}} $$ $$\gdef \lavender #1 {\textcolor{bebada}{#1}} $$ $$\gdef \red #1 {\textcolor{fb8072}{#1}} $$ $$\gdef \blue #1 {\textcolor{80b1d3}{#1}} $$ $$\gdef \orange #1 {\textcolor{fdb462}{#1}} $$ $$\gdef \green #1 {\textcolor{b3de69}{#1}} $$ $$\gdef \pink #1 {\textcolor{fccde5}{#1}} $$ $$\gdef \vgrey #1 {\textcolor{d9d9d9}{#1}} $$ $$\gdef \violet #1 {\textcolor{bc80bd}{#1}} $$ $$\gdef \unka #1 {\textcolor{ccebc5}{#1}} $$ $$\gdef \unkb #1 {\textcolor{ffed6f}{#1}} $$ % Vectors $$\gdef \vx {\pink{\vect{x }}} $$ $$\gdef \vy {\blue{\vect{y }}} $$ $$\gdef \vb {\vect{b}} $$ $$\gdef \vz {\orange{\vect{z }}} $$ $$\gdef \vtheta {\vect{\theta }} $$ $$\gdef \vh {\green{\vect{h }}} $$ $$\gdef \vq {\aqua{\vect{q }}} $$ $$\gdef \vk {\yellow{\vect{k }}} $$ $$\gdef \vv {\green{\vect{v }}} $$ $$\gdef \vytilde {\violet{\tilde{\vect{y}}}} $$ $$\gdef \vyhat {\red{\hat{\vect{y}}}} $$ $$\gdef \vycheck {\blue{\check{\vect{y}}}} $$ $$\gdef \vzcheck {\blue{\check{\vect{z}}}} $$ $$\gdef \vztilde {\green{\tilde{\vect{z}}}} $$ $$\gdef \vmu {\green{\vect{\mu}}} $$ $$\gdef \vu {\orange{\vect{u}}} $$ % Matrices $$\gdef \mW {\matr{W}} $$ $$\gdef \mA {\matr{A}} $$ $$\gdef \mX {\pink{\matr{X}}} $$ $$\gdef \mY {\blue{\matr{Y}}} $$ $$\gdef \mQ {\aqua{\matr{Q }}} $$ $$\gdef \mK {\yellow{\matr{K }}} $$ $$\gdef \mV {\lavender{\matr{V }}} $$ $$\gdef \mH {\green{\matr{H }}} $$ % Coloured math $$\gdef \cx {\pink{x}} $$ $$\gdef \ctheta {\orange{\theta}} $$ $$\gdef \cz {\orange{z}} $$ $$\gdef \Enc {\lavender{\text{Enc}}} $$ $$\gdef \Dec {\aqua{\text{Dec}}}$$

Here you have some guidelines regarding your contribution, using markdown. If you’re not yet familiar with this typesetting, have a look at this cheat sheet. Moreover, have a look at this markdown file in a proper text editor (say Vim).

(British) English

This website uses English spelling. So, there will be colours, labelling, analogue, behaviour, modelled, maximum, and so on.

Adding figures

When adding figures, make sure they are centred in the page. To do this, follow this syntax:

<img src="{​{site.baseurl}}/images/week01/01-3/Network.png" style="zoom: 40%; background-color:#DCDCDC;" /><br>
<b>Figure 2:</b> Network architecture.

In this particular example, the author chose to resize the image to 40% of its original size. Given that the image had a transparent background, an additional light colour (#DCDCDC) has been added to the background. Note that you must use prepend the file with {​{site.baseurl}}. Otherwise, it will not work on GitHub pages.

Adding figures side by side

In this case the author displayed two figures, side by side, using a table.

| <center><img src="{​{site.baseurl}}/images/week01/01-3/Spiral1.png" width="200px"/></center> | <center><img src="{​{site.baseurl}}/images/week01/01-3/Spiral2.png" height="170px"/></center> |
|                              (a) Input points, pre-network                                  |                               (b) Output points, post-network                                |

<center><b>Figure 1:</b> Five color spiral.</center>

Moreover, since a specific size was needed, width or height can be specified.

Adding headings

When adding headings, using two or three #, add an extra empty line in the source code.

Some text from a preceding paragraph.
 - - 1 - -
 - - 2 - -
## New heading
 - - 1 - -
More text.

Adding mathematical formula

This website uses KaTeX, therefore you may want to check out what the supported $\TeX$ functions are. For inserting some in-line formula, enclose it in single dollar signs, for example $y = mx + q \in \mathbb{R}$ renders as $ y = mx + q \in \mathbb{R}$. To insert a centred formula, you want to follow this syntax (pay attention to the empty lines).

Some text.
 - - 1 - -
ax^2 + bx + c = 0 \quad\Rightarrow\quad
_1x_2 = {-b \pm \sqrt{b^2 - 4ac} \over 2a}
 - - 1 - -
Some more text.

Some text.

\[ax^2 + bx + c = 0 \quad\Rightarrow\quad _1x_2 = {-b \pm \sqrt{b^2 - 4ac} \over 2a}\]

Some more text.

Mathematical notation

I am writing here a non exhaustive list of mathematical notation we’re going to use for the class website. We are planning on adding macros to ease writing.

  • The transposition symbol is $^\top$, which looks like $^\top$.
  • Vectors should use a lower-case bold and italic typesetting. This can be done with $\boldsymbol{x}$ and looks like $\boldsymbol{x}$. We may want to add a macro \vect{} for this.
  • Matrices should use a upper-case bold and italic typesetting. This can be done with $\boldsymbol{A}$ and looks like $\boldsymbol{A}$. We may want to add a macro \matr{} for this.
  • Function names are not in italic, hence $\max(\cdot)$, $\log(\cdot)$, $\tanh(\cdot)$, which look like $\max(\cdot)$, $\log(\cdot)$, $\tanh(\cdot)$, and so on.
  • The exponential function is $\exp(\cdot)$, $\exp(\cdot)$, and not $e^{(\cdot)}$, $e^{(\cdot)}$.
  • Computer names use $\texttt{}$ in the mathematical environment. For example we can write $\texttt{ReLU}(\cdot)$ for $\texttt{ReLU}(\cdot)$. If we are just talking about computer stuff, then we shall write ReLU or torch.relu(). While writing formulas we should prefer using $(\cdot)^+$, $(\cdot)^+$, for the positive part.
  • The conditional bar in $p(\vect{y} \mid \vect{x})$ is obtained typing \mid.
  • The norm of a vector $\Vert \cdot \Vert$ uses the \Vert command.