- Deep Learning with Theano
- Christopher Bourez
- 189字
- 2021-07-15 17:17:00
Single-layer linear model
The simplest model is the linear model, where for each class c
, the output is a linear combination of the input values:

This output is unbounded.
To get a probability distribution, pi
, that sums to 1, the output of the linear model is passed into a softmax function:

Hence, the estimated probability of class c
for an input x
is rewritten with vectors:

batch_size = 600 n_in = 28 * 28 n_out = 10 x = T.matrix('x') y = T.ivector('y') W = theano.shared( value=numpy.zeros( (n_in, n_out), dtype=theano.config.floatX ), name='W', borrow=True ) b = theano.shared( value=numpy.zeros( (n_out,), dtype=theano.config.floatX ), name='b', borrow=True ) model = T.nnet.softmax(T.dot(x, W) + b)
The prediction for a given input is given by the most probable class (maximum probability):
y_pred = T.argmax(model, axis=1)
In this model with a single linear layer, information moves from input to output: it is a feedforward network. The process to compute the output given the input is called forward propagation.
This layer is said fully connected because all outputs,

, are the sum of (are linked to) all inputs values through a multiplicative coefficient:

- CMDB分步構(gòu)建指南
- iOS 9 Game Development Essentials
- C#程序設(shè)計(慕課版)
- 編寫高質(zhì)量代碼:改善Python程序的91個建議
- Internet of Things with the Arduino Yún
- 單片機應(yīng)用技術(shù)
- Mastering KnockoutJS
- 大學(xué)計算機基礎(chǔ)(第2版)(微課版)
- Python深度學(xué)習(xí):基于TensorFlow
- Java網(wǎng)絡(luò)編程實戰(zhàn)
- AutoCAD 2009實訓(xùn)指導(dǎo)
- Mastering AWS Security
- 深入淺出Python數(shù)據(jù)分析
- After Effects CC技術(shù)大全
- Responsive Web Design with jQuery