新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
創(chuàng)新互聯(lián)Python教程:pythonReLU函數(shù)是什么
說明

網(wǎng)站建設(shè)哪家好,找成都創(chuàng)新互聯(lián)!專注于網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、微信小程序開發(fā)、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項(xiàng)目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了濰城免費(fèi)建站歡迎大家使用!
1、線性整流函數(shù),又稱為修正性線性單元,ReLU是一個(gè)分段函數(shù),其公式為:f(x)=max(0,x)。
2、比Sigmoid函數(shù)收斂速度更快。輸出以0為中心。由于飽和性產(chǎn)生的梯度消失。
實(shí)例
import numpy as np import matplotlib.pyplot as plot def relu(x): return np.maximum(0, x) if __name__ == "__main__": a = np.arange(-20, 20, 0.1) b = relu(a) plot.plot(a, b, label="ReLU", color="red") plot.legend() plot.grid() plot.show()
以上就是python ReLU函數(shù)的介紹,希望對(duì)大家有所幫助。更多Python學(xué)習(xí)指路:創(chuàng)新互聯(lián)python教程
本文教程操作環(huán)境:windows7系統(tǒng)、Python 3.9.1,DELL G3電腦。
網(wǎng)頁名稱:創(chuàng)新互聯(lián)Python教程:pythonReLU函數(shù)是什么
鏈接分享:http://m.fisionsoft.com.cn/article/cohjgoc.html


咨詢
建站咨詢
