2022-04-25 Skolotāju konference LiepU

image-20220425111609367

https://playground.tensorflow.org

image-20220425091503373

 

image-20220425110042323

image-20220425110404987

File:Neural network.svg - Wikimedia Commons

 

Derivative rules

Constant rule

x+cx=x+0=x

Power rule

cxnx=nxn1

Exponent rule

ef(x)dx=ef(x)f(x)dx

 

Chain rule

f(g(x))x=f(g(x))g(x)g(x)x

 

Product rule

f(x)g(x)x=f(x)xg(x)+f(x)g(x)x

Quotient Rule

xf(x)g(x)=g(x)xf(x)f(x)g(x)xg(x)2

 

Reciprocal rule

dx1f(x)=dxf(x)1=f(x)2f(x)dx

 

 

 

Model(x,W1,b1,W2,b2)=Linear(sigmoid(Linear(x,W1,b1)),W2,b2))=y
LMAE=|yy|
W1=W1LMAEW1αb1=b1LMAEb1α

 

SGD

image-20220425110210199

 

MAE derivative

LMAE=|yy|

LMAE=|a|=a2=(a2)12

LMAEy=?

1n=n1

1n10=n10

 

LMAEa=12(a2)121a2a=12(a2)1212a=a(a2)12=a(a2)12=a(a2)=a|a|+ϵ

 

Linear function

Linear(x,W,b)=Wx+b

Linear(x,W,b)W=x

Linear(x,W,b)x=W

Linear(x,W,b)b=1b0=1

 

Sigmoid function

img

 

σ(x)=11+ex

σ(x)x=11+ex=(1+ex)1=(1+ex)x1(1+ex)2=exxx1(1+ex)2=ex(1+ex)2=σ(x)(1σ(x))

reciprocal rule = chain & power rule dx1f(x)=f(x)1=f(x)2f(x)dx

exponent rule ef(x)dx=ef(x)f(x)dx