在神经网络中偏置输入的作用

转载:https://stackoverflow.com/questions/2480650/role-of-bias-in-neural-networks

I think that biases are almost always helpful. In effect,a bias value allows you to shift the activation function to the left or right, which may be critical for successful learning.

It might help to look at a simple example. Consider this 1-input, 1-output network that has no bias:

The output of the network is computed by multiplying the input (x) by the weight (w0) and passing the result through some kind of activation function (e.g. a sigmoid function.)

Here is the function that this network computes, for various values of w0:

Changing the weight w0essentially changes the "steepness" of the sigmoid. That's useful, but what if you wanted the network to output 0 when x is 2? Just changing the steepness of the sigmoid won't really work --you want to be able to shift the entire curve to the right.

That's exactly what the bias allows you to do. If we add a bias to that network, like so:

...then the output of the network becomes sig(w0*x + w1*1.0). Here is what the output of the network looks like for various values of w1:

Having a weight of -5 for w1shifts the curve to the right, which allows us to have a network that outputs 0 when x is 2.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,486评论 0 10
  • 很享受运动后的大汗淋漓!任汗水在脸颊,发中,身体上肆虐横行。汗水眯了眼睛,涩的睁不开;汗水流到嘴角,咸的合不住;汗...
    那山那水那一片天阅读 461评论 0 2
  • 又忘记了,是因为不在意还是什么呢?
    Whser阅读 303评论 0 0
  • 都说高考是改变一个人生活地点的考试,去年的高考,让我来到了"武城"-张家口。 经历3个多小时的火车,我来到长得平平...
    西西里没有里西西阅读 253评论 0 0
  • 又到了春暖花开,在家呆不住要出门踏青闲逛的季节了。我这个非做饭小达人在中餐还没有做得很好的情况下打算挑战下高难度西...
    闻听西辞阅读 1,220评论 3 6