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

網(wǎng)站建設哪家好,找成都創(chuàng)新互聯(lián)!專注于網(wǎng)頁設計、網(wǎng)站建設、微信開發(fā)、微信小程序開發(fā)、集團企業(yè)網(wǎng)站建設等服務項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了濰城免費建站歡迎大家使用!
1、線性整流函數(shù),又稱為修正性線性單元,ReLU是一個分段函數(shù),其公式為:f(x)=max(0,x)。
2、比Sigmoid函數(shù)收斂速度更快。輸出以0為中心。由于飽和性產(chǎn)生的梯度消失。
實例
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ù)的介紹,希望對大家有所幫助。更多Python學習指路:創(chuàng)新互聯(lián)python教程
本文教程操作環(huán)境:windows7系統(tǒng)、Python 3.9.1,DELL G3電腦。
分享文章:創(chuàng)新互聯(lián)Python教程:pythonReLU函數(shù)是什么
標題來源:http://m.5511xx.com/article/cohjgoc.html


咨詢
建站咨詢
