简体   繁体   English

神经网络模型如何为单层中的每个神经元学习不同的权重?

[英]How do neural network models learn different weights for each of the neuron in a single layer?

I had had an overwiew of how neural networks work and have come up with some interconnected questions, on which I am not able to find an answer.我对神经网络的工作原理有一个概述,并提出了一些相互关联的问题,但我无法找到答案。

Considering one-hidden-layer feedforward neural network: if the function for each of the hidden-layer neurons is the same考虑单隐藏层前馈神经网络:如果每个隐藏层神经元的 function 相同

a1 = relu (w1x1+w2x2), a2=relu(w3x1+w4x2), ...  

How do we make the model learn different values of weights?我们如何让 model 学习不同的权重值?

I do undestand the point of manually-established connections between neurons.我确实不明白神经元之间手动建立连接的意义。 As shown on the picture Manually established connections between neurons , that way we define the possible functions of functions (ie, house size and bedrooms number taken together might represent a possible family size which the house would accomodate).如图所示手动建立神经元之间的连接,这样我们就定义了功能的可能功能(即,房屋大小和卧室数量加在一起可能代表房屋可能容纳的家庭规模)。 But the fully-connected network doesn't make sense to me.但是完全连接的网络对我来说没有意义。

I get the point that a fully-connected neural network should somehow automatically define, which functions of functions make sense, but how does it do it?我明白一个完全连接的神经网络应该以某种方式自动定义,函数的哪些功能是有意义的,但它是如何做到的呢?

Not being able to answer this question, I don't also understand why should increasing the number of neurons increase the accuracy of model prediction ?无法回答这个问题,我也不明白为什么要增加神经元的数量来提高 model 预测的准确性

How do we make the model learn different values of weights?我们如何让 model 学习不同的权重值?

By initializing the parameters before training starts.通过在训练开始之前初始化参数。 In case of a fully connected neural network otherwise we would have the same update step on each parameter - that is where your confusion is coming from.如果是完全连接的神经网络,否则我们将对每个参数进行相同的更新步骤 - 这就是您的困惑的来源。 Initialization, either randomly or more sophisticated (eg Glorot) solves this.随机初始化或更复杂的初始化(例如 Glorot)解决了这个问题。

Why should increasing the number of neurons increase the accuracy of the model prediction?为什么增加神经元的数量会提高 model 预测的准确性?

This is only partially true, increasing the number of neurons should improve your training accuracy (it is a different game for your validation and test performance).这只是部分正确,增加神经元的数量应该会提高您的训练准确性(对于您的验证和测试性能而言,这是一个不同的游戏)。 By adding units your model is able to store additional information or incorporate outliers into your network, and hence improve the accuracy of the prediction.通过添加单元,您的 model 能够存储额外信息或将异常值合并到您的网络中,从而提高预测的准确性。 Think of a 2D problem (predicting house prizes per sqm over sqm of some property).考虑一个二维问题(预测每平方米的房屋奖品超过某些房产的平方米)。 With two parameters you can fit a line, with three a curve and so on, the more parameters the more complex your curve can get and fit through each of your training points.使用两个参数可以拟合一条线,使用三个参数可以拟合一条曲线,依此类推,参数越多,曲线就越复杂,并且可以拟合每个训练点。

Great next step for a deep dive - Karpathy's lecture on Computer Vision at Stanford.深入了解的下一步- Karpathy 在斯坦福大学的计算机视觉讲座。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM