Links
Markdown quick reference
Table (Playing with Kaggle; uses Markdown includes)
--- snip ---
Model
Epochs
bs
lr
Momentum
Result (local)
Result (Kaggle)
Remarks
SimpleNet
50
20
0.007
0.9
~97
ConvNet
50
25
0.008
0.9
99.257
"
50
17
0.008
0.9
99.1964
augmented
"
50
17
0.008
0.9
99.3143
99.342
augmented bn
Binary Ensemble
25
17
0.007
0.9
>99
"
22
17
0.0085
0.9
99.23928
99.328
augmented
"
22
17
0.0085
0.9
99.34643
99.357
augmented bn
--- snap ---
(1) augmented: one additional variant per image rotated randomly in [-5,5] degree.
(2) bn: batch-norm
Mathematics
Inline Math: f i ( x ) = ∫ τ ( π ) ∞ e ( x , y ) d y f_{i}(x) = \int_{\tau(\pi)}^\infty e(x,y)dy f i ​ ( x ) = ∫ τ ( π ) ∞ ​ e ( x , y ) d y
Display Math:
[ a 11 a 12 … ⋮ ⋱ a n 1 a n n ]
\begin{bmatrix}
a_{11} & a_{12} & \dots \\
\vdots & \ddots & \\
a_{n1} & & a_{nn}
\end{bmatrix}
​ a 11 ​ ⋮ a n 1 ​ ​ a 12 ​ ⋱ ​ … a nn ​ ​ ​
Inline Math: ( Ω , F , P ) ≔ ( Ω + × Ω − , F + ⊗ F − , P + × P − ) (\Omega,\mathcal{F},P) \coloneqq (\Omega^+\times\Omega^-,\mathcal{F^+}\otimes\mathcal{F^-},P^+\times P^-) ( Ω , F , P ) : = ( Ω + × Ω − , F + ⊗ F − , P + × P − )
Display Math:
The Wiener process in ( Ω , F , P ) (\Omega,\mathcal{F},P) ( Ω , F , P ) is defined by
ω ( t ) ≔ { ( ω + ( t ) , 0 ) t ≥ 0 ( 0 , ω − ( t ) ) t < 0
\omega(t) \coloneqq
\left\{
\begin{array}{cc}
(\omega^+(t),0) & t\geq 0 \\
(0,\omega^-(t)) & t<0
\end{array}
\right.
ω ( t ) : = { ( ω + ( t ) , 0 ) ( 0 , ω − ( t )) ​ t ≥ 0 t < 0 ​
More math...
d y t = ∑ i = 1 n x t i ∥ x t ∥ 2 ( ∑ j = 1 n u i j x t i d t + ∑ k = 1 m ∑ j = 1 n v i j k x t j ∘ d W t k ) + ⋯ ⋯ + 1 2 ∑ i , j n ( δ i j ∥ x t ∥ 2 − 2 x t i x t j ∥ x t ∥ 4 )    ∑ k m ∑ l , p n v i l k v j p k x t l x t p    d t (3.1a)
\tag{3.1a}
\begin{aligned}
dy_t &= \sum_{i=1}^n \frac{x_t^i}{\|x_t\|^2} \left( \sum_{j=1}^n
u_{ij} x_t^i\,dt + \sum_{k=1}^m \sum_{j=1}^n v_{ij}^k
x_t^j\circ dW_t^k\right) + \cdots\\
\cdots &+ \frac{1}{2} \sum_{i,j}^n \left( \frac{\delta_{ij}}{\|x_t\|^2} -
\frac{2x_t^i x_t^j}{\|x_t\|^4} \right)\; \sum_k^m \sum_{l,p}^n
v_{il}^k v_{jp}^k\, x_t^l x_t^p\;dt
\end{aligned}
d y t ​ ⋯ ​ = i = 1 ∑ n ​ ∥ x t ​ ∥ 2 x t i ​ ​ ( j = 1 ∑ n ​ u ij ​ x t i ​ d t + k = 1 ∑ m ​ j = 1 ∑ n ​ v ij k ​ x t j ​ ∘ d W t k ​ ) + ⋯ + 2 1 ​ i , j ∑ n ​ ( ∥ x t ​ ∥ 2 δ ij ​ ​ − ∥ x t ​ ∥ 4 2 x t i ​ x t j ​ ​ ) k ∑ m ​ l , p ∑ n ​ v i l k ​ v j p k ​ x t l ​ x t p ​ d t ​ ( 3.1a )
With z t ≔ x t ∥ x t ∥ z_t \coloneqq \frac{x_t}{\|x_t\|} z t ​ : = ∥ x t ​ ∥ x t ​ ​ we get the following differential equation on the unit sphere:
y t = y 0 + ∫ 0 t z t T U z t − ∥ z t ∥ − 2 z t T V ^ V ^ T z t + 1 2 trace ( V ^ V ^ T ) d t + ⋯ ⋯ + ∑ k = 1 m ∫ 0 t z t T V k z t ∘ d W t k (3.1b)
\tag{3.1b}
\begin{aligned}
y_t &= y_0 + \int_0^t z_t^TUz_t- \|z_t\|^{-2}
z_t^T\hat{V}\hat{V}^T z_t + \frac{1}{2}\text{ trace
}(\hat{V}\hat{V}^T)\,dt +\cdots\\
\cdots &+ \sum_{k=1}^m \int_0^t z_t^TV^kz_t\circ dW_t^k
\end{aligned}
y t ​ ⋯ ​ = y 0 ​ + ∫ 0 t ​ z t T ​ U z t ​ − ∥ z t ​ ∥ − 2 z t T ​ V ^ V ^ T z t ​ + 2 1 ​ trace ( V ^ V ^ T ) d t + ⋯ + k = 1 ∑ m ​ ∫ 0 t ​ z t T ​ V k z t ​ ∘ d W t k ​ ​ ( 3.1b )
Outline as partial TeX file inclusion
Line block - takes only the inner part of a LaTeX display-math environment by specifying row delimiters for the included LaTeX file:
--- snip ---
z = z ( x , y ) x = x ( s 1 , s 2 ) y = y ( t 1 , t 2 ) s i = s i ( w )    ∀ i ∈ { 1 , 2 } t i = t i ( w )    ∀ i ∈ { 1 , 2 }
\begin{aligned}
z &= z(x, y)\\
x &= x(s_1, s_2)\\
y &= y(t_1, t_2)\\
s_i &= s_i(w) \; \forall i \in \{1,2\} \\
t_i &= t_i(w) \; \forall i \in \{1,2\}
\end{aligned}
z x y s i ​ t i ​ ​ = z ( x , y ) = x ( s 1 ​ , s 2 ​ ) = y ( t 1 ​ , t 2 ​ ) = s i ​ ( w ) ∀ i ∈ { 1 , 2 } = t i ​ ( w ) ∀ i ∈ { 1 , 2 } ​
--- snap ---
Single line (as inline): start include ->
∂ z ∂ w = ∂ z ∂ x ⋅ ( ∂ x ∂ s 1 ⋅ ∂ s 1 ∂ w + ∂ x ∂ s 2 ⋅ ∂ s 2 ∂ w ) + ∂ z ∂ y ⋅ ( ∂ y ∂ t 1 ⋅ ∂ t 1 ∂ w + ∂ y ∂ t 2 ⋅ ∂ t 2 ∂ w )
{\partial z\over\partial w}={\partial z\over\partial x}\cdot\Bigg({\partial x\over\partial s_1}\cdot{\partial s_1\over\partial w} + {\partial x\over\partial s_2}\cdot{\partial s_2\over\partial w}\Bigg) + {\partial z\over\partial y}\cdot\Bigg({\partial y\over\partial t_1}\cdot{\partial t_1\over\partial w} + {\partial y\over\partial t_2}\cdot{\partial t_2\over\partial w}\Bigg)
∂ w ∂ z ​ = ∂ x ∂ z ​ ⋅ ( ∂ s 1 ​ ∂ x ​ ⋅ ∂ w ∂ s 1 ​ ​ + ∂ s 2 ​ ∂ x ​ ⋅ ∂ w ∂ s 2 ​ ​ ) + ∂ y ∂ z ​ ⋅ ( ∂ t 1 ​ ∂ y ​ ⋅ ∂ w ∂ t 1 ​ ​ + ∂ t 2 ​ ∂ y ​ ⋅ ∂ w ∂ t 2 ​ ​ )
<- stop include
Footnotes are possible, like using and .
Citations
SVG Image
Embedded using Markdown extension (attr_list ) and table (for caption):
Neuron image - 80%
Code
Verbatim file inclusion
# include example
from torch.utils.data import TensorDataset
from torch import Tensor , LongTensor , FloatTensor
def loadData ( path ) -> Tuple [ np . ndarray , np . ndarray ]:
'''
Load data from kaggle mnist set.
'''
# Read
df = pd . read_csv ( str ( path )) # 40.000 entries
# tdata = pd.read_csv(data_raw_dir + sep + 'train.csv') # 28.000 entries
has_labels = True if 'label' in df . columns else False
Normal code block
from torch.utils.data import TensorDataset
from torch import Tensor , LongTensor , FloatTensor
def loadData ( path ) -> Tuple [ np . ndarray , np . ndarray ]:
'''
Load data from kaggle mnist set.
path -- input csv
Return scaled images [0,1] and labels (if available)
as numpy arrays (dtype: float32, int64)
'''
# Read
df = pd . read_csv ( str ( path )) # 40.000 entries
# tdata = pd.read_csv(data_raw_dir + sep + 'train.csv') # 28.000 entries
has_labels = True if 'label' in df . columns else False
Some inline code
.
References Giovanni Dematteis, Tobias Grafke, and Eric Vanden-Eijnden .
Rogue waves and large deviations in deep sea.
Proceedings of the National Academy of Sciences , 115(5):855–860, January 2018.
doi:10.1073/pnas.1710670115 . ↩
Hugo Touchette.
A basic introduction to large deviations: Theory , applications, simulations.
arXiv:1106.4146 [cond-mat, physics:math-ph] , February 2012.
arXiv:1106.4146 . ↩