sigm
a
1
W
1r
errora
dlossr
errory
a
r
loss12sumsum
error2mr
e
dr
r
fu
ctio
XsigmPr
X11expPr
e
dr
第三个m文件命名为
trai
mr
fu
ctio
L
trai
trai
_xtrai
_yoptsr
msizetrai
_x1r
batchsizeoptsbatchsizer
umepochsopts
umepochsr
umbatchesfloormbatchsizer
Lzeros
umepochs
umbatches1r
1r
fork1
umepochsr
ticr
kkra
dpermmr
forj1
umbatchesr
batch_xtrai
_xkkj1batchsize1jbatchsizer
batch_ytrai
_ykkj1batchsize1jbatchsizer
r
ff
batch_xbatch_yr
bp
r
grads
r
r
L
lossr
1r
e
dr
ttocr
ff
trai
_xtrai
_yr
str_perfspri
tfFullbatchtrai
errf
lossr
dispNNtrai
epoch
um2strk
um2stropts
umepochsTook
um2strtseco
dsMi
ibatchmea
squarederroro
trai
i
gsetis
um2strmea
L
umbatches
1str_perfr
e
dr
e
dr
r
fu
ctio
ff
xyr
r
msizex1r
xo
esm1xr
a1xr
feedforwardpassr
fori2
1r
aisigm
ai1
Wi1r
Addthebiastermr
aio
esm1
air
e
dr
a
sigm
a
1
W
1r
errora
dlossr
errory
a
r
loss12sumsum
error2mr
e
dr
r
fu
ctio
bp
r
r
d
error
a
1
a
r
fori
112r
Derivativeoftheactivatio
fu
ctio
r
d_act
ai1
air
Backpropagatefirstderivativesr
ifi1
i
thiscasei
d
thereis
otthebiastermtoberemovedr
didi1
Wid_actBishop556r
elsei
thiscasei
dithebiastermhastoberemovedr
didi12e
d
Wid_actr
e
dr
e
dr
fori1
1r
ifi1
r
dWidi1
aisizedi11r
elser
dWidi12e
d
aisizedi11r
e
dr
e
dr
e
dr
r
fu
ctio
grads
r
fori1
1r
dW
dWir
dW
lear
i
g_ratedWr
if
mome
tum0r
vWi
mome
tum
vWidWr
dW
vWir
e
dr
Wi
WidWr
e
dr
e
dr
r
fu
ctio
XsigmPr
X11expPr
e
dr
第4个m文件命名为rbmtrai
mr
fu
ctio
rbmrbmtrai
rbmxoptsr
msizex1r
umbatchesrou
dmoptsbatchsizer
fori1opts
umepochsr
kkra
dpermmr
err0r
forl1
umbatchesr
batchxkkl1optsbatchsize1loptsbatchsizer
r
v1batchr
h1sigmr
drepmatrbmcoptsbatchsize1v1rbmWr
r