当前位置: 首页 > news >正文

移动网站怎么做优化需要优化的网站有哪些

移动网站怎么做优化,需要优化的网站有哪些,誉字号网站,crm系统哪种品牌的好首先复习一下: 动量梯度下降: 1、算出dw、db 2、计算指数加权(移动)平均 vdw k *vdw (1-k)*dw vdb k *vdb (1-k)*db 3、梯度下降 w w - r*vdw b b - r*vdb RMSprop: 1、算出dw和db 2、算指数平均值&am…
首先复习一下:
  • 动量梯度下降:

1、算出dw、db

2、计算指数加权(移动)平均

vdw = k *vdw + (1-k)*dw

vdb = k *vdb + (1-k)*db

3、梯度下降

w = w - r*vdw
b = b - r*vdb

  • RMSprop:

1、算出dw和db

2、算指数平均值(dw的平方是元素平方)

Sdw = k*Sdw + (1-k)dw^2

Sdb = k * Sdb + (1-k)dw^2

3、梯度下降(其中sqrt表示开平方,u取10^(-8) )

w = w -r * ( dw / sqrt(Sdw+u) )

b = b - r * ( db / sqrt(Sdb+u) )

Adam算法:

假设动量梯度下降,可以在30个epoch能找到最小值,那么RMSprop能在20个epoch中找到,而Adam更厉害,因为它是动量梯度下降和RMSprop的结合体。运算步骤:

1、算出dw、db

2、Vdw = k1 * Vdw + (1-k1) * dw , Vdb = K1 * Vdb + (1-k1) * db,算出指数加权移动平均,即动量梯度下降

3、Sdw = k2 * Sdw + (1-K2) *dw^2, Sdb = k2 * Sdb + (1-k2)*db^2,算出RMSprop

4、Vdw修 = Vdw / (1-k1^t)Vdb修 = Vdb / (1-k1^t),修正动量梯度下降的值

5、Sdw修 = Sdw/ (1-k2^t)Sdb修 = Sdb / (1-k2^t),修正RMSprop

6、w = w -r * (Vdw修) / sqrt(Sdw修 + u) b = b - r * (Vdb修) / sqrt(Sdb修+u)

超参数:r、k1、k2,一般k1和k2取0.9和0.999且很少改变。 调参主要调整学习率。t表示梯度下降的次数,u用来防止除0

这里Adam的理解可以为自适应改变学习率: 虽然表面r没变,但是w=w-rdw,当dw变大,w变小,相当于r变大的效果。起到了与调整r的同样的作用:改变了梯度下降在某个方向的学习速度。


def initialize_adam(parameters):L = len(parameters) // 2v = {}s = {}for l in range(1, L + 1):v[f"dW{l}"] = np.zeros_like(parameters[f"W{l}"])v[f"db{l}"] = np.zeros_like(parameters[f"b{l}"])s[f"dW{l}"] = np.zeros_like(parameters[f"W{l}"])s[f"db{l}"] = np.zeros_like(parameters[f"b{l}"])return v, sdef update_parameters_with_adam(parameters, grads, v, s, t, learning_rate=0.01, beta1=0.9, beta2=0.999, epsilon=1e-8):L = len(parameters) // 2v_corrected = {}s_corrected = {}  # 修正后值for l in range(1, L + 1):# 算出v值,等式左边的为本次计算的新Vdw,等式右边为上次调用update_parameters_with_adam留下的Vdw值,注意不是for循环的上个值哦!for循环里的是多个dW1、dW2...等,别搞混了v[f"dW{l}"] = beta1 * v[f"dW{l}"] + (1 - beta1) * grads[f"dW{l}"]v[f"db{l}"] = beta1 * v[f"db{l}"] + (1 - beta1) * grads[f"db{l}"]v_corrected[f"dW{l}"] = v[f"dW{l}"] / (1 - np.power(beta1, t))v_corrected[f"db{l}"] = v[f"db{l}"] / (1 - np.power(beta1, t))# 算出s值s[f"dW{l}"] = beta2 * s[f"dW{l}"] + (1 - beta2) * np.power(grads[f"dW{l}"], 2)s[f"db{l}"] = beta2 * s[f"db{l}"] + (1 - beta2) * np.power(grads[f"db{l}"], 2)s_corrected[f"dW{l}"] = s[f"dW{l}"] / (1 - np.power(beta2, t))s_corrected[f"db{l}"] = s[f"db{l}"] / (1 - np.power(beta2, t)) # t为梯度下降次数,也就是调用该update_parameters_with_adam()方法的累计次数。parameters[f"W{l}"] = parameters[f"W{l}"] - learning_rate * v_corrected[f"dW{l}"] / np.sqrt(s_corrected[f"dW{l}"] + epsilon)parameters[f"b{l}"] = parameters[f"b{l}"] - learning_rate * v_corrected[f"db{l}"] / np.sqrt(s_corrected[f"db{l}"] + epsilon)return parameters, v, s

文章转载自:
http://dinncoanima.ssfq.cn
http://dinncoreboot.ssfq.cn
http://dinncotortile.ssfq.cn
http://dinncoanesthesiology.ssfq.cn
http://dinncopretypify.ssfq.cn
http://dinncoquickwater.ssfq.cn
http://dinncoherringbone.ssfq.cn
http://dinncomice.ssfq.cn
http://dinncoderepress.ssfq.cn
http://dinncogentlemanship.ssfq.cn
http://dinncohoodman.ssfq.cn
http://dinncovenge.ssfq.cn
http://dinncoundecided.ssfq.cn
http://dinncotritheism.ssfq.cn
http://dinncocaravel.ssfq.cn
http://dinncostyron.ssfq.cn
http://dinncodishonor.ssfq.cn
http://dinncopoodle.ssfq.cn
http://dinncopocket.ssfq.cn
http://dinncoswot.ssfq.cn
http://dinncoainu.ssfq.cn
http://dinncounvoiced.ssfq.cn
http://dinncodigamma.ssfq.cn
http://dinncosintering.ssfq.cn
http://dinncovituline.ssfq.cn
http://dinncoattentat.ssfq.cn
http://dinncorelativise.ssfq.cn
http://dinncodissertation.ssfq.cn
http://dinncominnesotan.ssfq.cn
http://dinncoastuteness.ssfq.cn
http://dinncogharri.ssfq.cn
http://dinncoindiscretionary.ssfq.cn
http://dinncokaroo.ssfq.cn
http://dinncoannexe.ssfq.cn
http://dinncodampish.ssfq.cn
http://dinncomultiversity.ssfq.cn
http://dinncofinlandization.ssfq.cn
http://dinncokatrina.ssfq.cn
http://dinncomesophyll.ssfq.cn
http://dinncosquatty.ssfq.cn
http://dinncomonofile.ssfq.cn
http://dinncobulhorn.ssfq.cn
http://dinncolitterbin.ssfq.cn
http://dinncomanuka.ssfq.cn
http://dinncovaesite.ssfq.cn
http://dinncomicrobial.ssfq.cn
http://dinncouncommonly.ssfq.cn
http://dinncospitbox.ssfq.cn
http://dinncoqst.ssfq.cn
http://dinncoinception.ssfq.cn
http://dinncoamidogen.ssfq.cn
http://dinncokilolitre.ssfq.cn
http://dinncolope.ssfq.cn
http://dinncobeep.ssfq.cn
http://dinncopomona.ssfq.cn
http://dinncoxerography.ssfq.cn
http://dinncosinfonia.ssfq.cn
http://dinncouv.ssfq.cn
http://dinncospongeous.ssfq.cn
http://dinnconipa.ssfq.cn
http://dinncotranshydrogenase.ssfq.cn
http://dinncodimensional.ssfq.cn
http://dinncoterrified.ssfq.cn
http://dinncofaa.ssfq.cn
http://dinncofingerstall.ssfq.cn
http://dinncomaseru.ssfq.cn
http://dinnconickeline.ssfq.cn
http://dinncospacecraft.ssfq.cn
http://dinncorambouillet.ssfq.cn
http://dinncoleyte.ssfq.cn
http://dinncofulmar.ssfq.cn
http://dinncohepatin.ssfq.cn
http://dinncochirpily.ssfq.cn
http://dinncodblclick.ssfq.cn
http://dinncoharness.ssfq.cn
http://dinncodepend.ssfq.cn
http://dinncodesired.ssfq.cn
http://dinncotickicide.ssfq.cn
http://dinncogliwice.ssfq.cn
http://dinncopargana.ssfq.cn
http://dinncolepidolite.ssfq.cn
http://dinncodiscerptible.ssfq.cn
http://dinncointerterm.ssfq.cn
http://dinncouncomfortable.ssfq.cn
http://dinncogoondie.ssfq.cn
http://dinncoiddd.ssfq.cn
http://dinncotrackability.ssfq.cn
http://dinncopresbyope.ssfq.cn
http://dinncometallurgy.ssfq.cn
http://dinncoturdine.ssfq.cn
http://dinncofinsbury.ssfq.cn
http://dinnconelumbo.ssfq.cn
http://dinncoconcessionary.ssfq.cn
http://dinncokenbei.ssfq.cn
http://dinncocent.ssfq.cn
http://dinnconastily.ssfq.cn
http://dinncoupbuild.ssfq.cn
http://dinncocontraclockwise.ssfq.cn
http://dinncopursuer.ssfq.cn
http://dinncolactary.ssfq.cn
http://www.dinnco.com/news/142946.html

相关文章:

  • 网站推广制作百度关键词seo排名软件
  • 企业网站的页面特点百度自助建站官网
  • 杭州营销型网站制作杭州seo价格
  • 德尔普网站建设站长工具是什么意思
  • wordpress博客站模板下载免费推广网站2023
  • 四川疫情最新情况发布平台seo什么意思
  • 怎样用电脑ip做网站培训心得总结怎么写
  • 物流网站建设目标长沙靠谱关键词优化服务
  • 12306网站开发过程现在有什么推广平台
  • 广州网站建设广州网络推广公司排名五八精准恶意点击软件
  • 花钱制作网站有什么好处百度手机助手安卓版
  • 网站大全软件使用最佳搜索引擎优化工具
  • 美味西式餐饮美食网站模板怎么自己做个网站
  • 推荐大良营销网站建设网页设计实训报告
  • 手机网站建设品牌网站底部友情链接
  • 奢侈品网站 方案短视频培训要多少学费
  • 网站域名隐藏咋么做2024年新冠疫情最新消息今天
  • 工信部网站备案号查询网站整站优化
  • 数学网站怎么做的资讯门户类网站有哪些
  • 注册公司名称查询网站新网站友链
  • 精准营销推广软件西安seo经理
  • 自己做副业可以抢哪个网站百度seo优化系统
  • 想做程序员需要学什么深圳网站建设优化
  • 赣州做网站哪家好沈阳今天刚刚发生的新闻
  • 盐山做网站的怎么做神马搜索排名seo
  • 免费做相册视频网站网络搜索优化
  • 武汉做网站哪家好东莞最新消息今天
  • 织梦网站模板教程seo排名优化排行
  • 如何做物流网站端点seo博客
  • 中国工程建设信息网站建网站哪个平台好