当前位置:网站首页>The difference between Tansig and logsig. Why does BP like to use Tansig
The difference between Tansig and logsig. Why does BP like to use Tansig
2022-07-07 01:30:00 【Old cake explanation BP neural network】
Original article , Reprint please indicate from 《 Old cake explains neural networks 》:bp.bbbdata.com
About 《 Old cake explains neural networks 》:
This website structurally explains the knowledge of Neural Networks , Principle and code .
repeat matlab Algorithm of neural network toolbox , It is a good assistant for learning neural networks .
Catalog
Why? BP Neural networks are generally used tansig, I believe this is the confusion of many people .
We might as well analyze tansig and logsig Properties of 、 characteristic 、 Derivative and so on ,
Try to find out why they tend to use tansig Why .
01. Formula analysis
The formula
tansig and logsig The formula is as follows :
analysis
From the formula of both , There is not much difference between the two ,
tansig It's just logsig Perform stretching and translation operation on the basis of .
Both rely on exponential calculations , There is no difference in computational complexity .
therefore , On the formula level , It does not constitute a tendentious choice tansig The reason of .
02. Characteristic analysis
characteristic
When tansig When the independent variable is one dimension , It's a S Shape curve .
● Its value range is (-1,1)
● tansig The nonlinear part mainly focuses on 【-1.7,1.7】 Between ,
● stay 【-1.7,1.7】 Outside ,tansig Gradually tend to saturation .When logsig When the independent variable is one dimension , It's a S Shape curve .
● Its value range is (0,1)
● logsig The nonlinear part mainly focuses on 【-1.7,1.7】 Between ,
● stay 【-1.7,1.7】 Outside ,logsig Gradually tend to saturation .
analysis
From the comparison of characteristics , We have not found any qualitative difference between the two ,
because tansig Will be logsig Stretch , Translation to 【-1,1】 The value range of .
I didn't find much difference in features ,
The only difference is , The two values are different .
03. Derivative Analysis
derivative
tansig The derivative of is :
logsig The derivative of is :
analysis
Through the comparison of derivatives ,
Both of them can use their own value to obtain the derivative value ,
The amount of calculation is also consistent ,
therefore , On derivative tansig There is no greater advantage ,
Does not constitute a tendency to use tansig Why
The author's view
Through the above analysis , We can hardly see tansig Than logsig What are the advantages of .
Then why use tansig Well ?
The author's view is ,
One 、 Unified input range .
Two 、 Make full use of the active interval of the activation function
We know , The input of the upper layer is the output of the lower layer ,
and tansig and logsig The active range of is 【-1.7,1.7】 Between ,
In the input layer , We will undoubtedly normalize the input to 【-1,1】,
It is more effective for using the active interval of the activation function of the first hidden layer .
And use tansig, In the case of multiple hidden layers ,
Output of each layer , That is, the input of the lower layer is still 【-1,1】
In this way, the input range of each layer is unified ,
And they all make effective use of the active interval of the activation function .
Unity is very beneficial ,
At least in theoretical research , It can bring a lot of convenience ,
Otherwise, we need to discuss the input layer and hidden layer respectively .
The above is the author's view , Because there is no literature research , For reference only .
边栏推荐
猜你喜欢
Transformation transformation operator
AcWing 361. 观光奶牛 题解(spfa求正环)
Boot - Prometheus push gateway use
[advanced C language] 8 written questions of pointer
子网划分、构造超网 典型题
Start from the bottom structure to learn the customization and testing of fpga---- FIFO IP
405 method not allowed appears when the third party jumps to the website
1123. The nearest common ancestor of the deepest leaf node
Comparison of picture beds of free white whoring
Clickhouse fields are grouped and aggregated, and SQL is queried according to the granularity of any time period
随机推荐
Failed to successfully launch or connect to a child MSBuild. exe process. Verify that the MSBuild. exe
C language - array
Taro中添加小程序 “lazyCodeLoading“: “requiredComponents“,
Dark horse notes - exception handling
C language instance_ three
According to the analysis of the Internet industry in 2022, how to choose a suitable position?
[case sharing] basic function configuration of network loop detection
The cost of returning tables in MySQL
免费白嫖的图床对比
C语言实例_4
Table table setting fillet
Atomic in golang and CAS operations
table表格设置圆角
Transformation transformation operator
Oracle: Practice of CDB restricting PDB resources
golang中的atomic,以及CAS操作
tansig和logsig的差异,为什么BP喜欢用tansig
HMM notes
Docker method to install MySQL
黑马笔记---异常处理