Basic : Mini-Batch in Dense Layer

Austin Jiuk Kim·2022년 3월 25일
0

Deep Learning

목록 보기
8/10

Mini-Batch in Dense Layer

shape?

calculation?

output?

lvl_{\overrightarrow{v}} : The length of v Vector

nvn_{\overrightarrow{v}} : The number of v Vector

i(lv)i_{(l_{\overrightarrow{v}})} : The index of (the length of v Vector)

mcoordinate[from]m^{[from]}_{coordinate} : The element of M Marix

The length of

AT=(a(i(Nx),i(la))[iL])RNx×lν[i(L)]DenseLayerXT=(xi(lx)[i(Nx)])RNx×lx{A}^{T} = (\, \ddots {{a}_{(i_{(N_{\overrightarrow{x}})}, \:i_{(l_{\overrightarrow{a}})})}^{[i_{L}]}}\ddots \,) \in \: {\R}^{N_{\overrightarrow{x}} \times l_{\overrightarrow{\nu}^{[i_{(L)}]}}} \:\\ \:\\ \uparrow\\ Dense\,Layer \\ |\\ \:\\ \:\\ {X}^{T} = (\, \ddots {x}^{[i_{(N_{\overrightarrow{x}})}]}_{i_{(l_{\overrightarrow{x}})}}\ddots \,) \in \: {\R}^{N_{\overrightarrow{x}} \times l_{\overrightarrow{x}}}
Nx×(lxlν[i(L)]){N_{\overrightarrow{x}} \times ( l_{\overrightarrow{x}}} \rightarrow l_{\overrightarrow{\nu}^{[i_{(L)}]}} )

Passing through the layers, Dense Layer converts the columns of the Materix, from the number of x Vector to the number of ν\nu Vector.

zi,j[1]=(x(i))Twj[1]+bj[1]z^{[1]}_{i,\: j} = (\overrightarrow{x}^{(i)})^T \cdot\overrightarrow{w}^{[1]}_{j} + b^{[1]}_{j}
ai,j[1]=g(zi,j[1])a^{[1]}_{i,\: j} = g(z^{[1]}_{i,\: j})

You have to observe the shape.

The Activation is one-to-one correspondence. The shape do not change.

So. in a column, as neuron-wise, the same neuron
And, in a row, as Batch-wise, the same layer

Batch is the set of data, X Matrix

Cascaded Dense Layer

XT=Rnx×lxX^T = \R^{n_{\overrightarrow{x}} \times l_{\overrightarrow{x}}}
W=Rlx×nνB=Rnx×nνW = \R^{l_{\overrightarrow{x}} \times n_{\overrightarrow{\nu}}} \:\\ B = \R^{n_{\overrightarrow{x}} \times n_{\overrightarrow{\nu}}}
ZT=Rnx×nνZ^T = \R^{n_{\overrightarrow{x}} \times n_{\overrightarrow{\nu}}}
AT=Rnx×nνA^T = \R^{n_{\overrightarrow{x}} \times n_{\overrightarrow{\nu}}}

I think that it is much more proper to count neurons using not length but number because neurons are indenpendent each other like the relations among the x vectors of the X matrix.

profile
그냥 돼지

0개의 댓글