在MATLAB中的MLP神经网络中断开某些输入隐藏层的连接 [英] Disconnect some input-hidden layer connections in MLP neural network in MATLAB

查看:508
本文介绍了在MATLAB中的MLP神经网络中断开某些输入隐藏层的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于某些实现,我正在使用MATLAB中的神经网络(NN)向导.我也可以在MATLAB中使用基于代码的NN版本,可以通过向导构造NN之后使用它(很明显!).

I am using Neural Network (NN) wizard in MATLAB for some implementations. Also i can use code-based version of NN in MATLAB which is available after construction NN by wizard (It is clear!).

当我们为我们的NN提供MATLAB时,它是一个完全连接的输入隐藏层.例如,如果您在输入层中有4个输入,在隐藏层中有2个神经元,那么我们在隐藏层中有4个输入和2个神经元之间的完全连接关系.我将操纵这种连接.例如,在隐藏层中断开与第一神经元的第三输入连接和与第二神经元的第二输入连接.用MATLAB怎么可能?

When we provide our NN with MATLAB, it is a fully connected input-hidden layer. For example, if you have 4 inputs in the input layer and 2 neurons in the hidden layer, we have fully connected relation between 4 inputs and 2 neurons in hidden layer. I am going to manipulate this connections. For example, disconnect 3rd input connection to 1st neuron and 2nd input connection to 2nd neuron in hidden layer. How is it possible by the MATLAB?

在此先感谢您的指导.

推荐答案

我完整地阅读了MATLAB中的NN文档.使用以下命令,我们可以访问每个连接并更改其权重和偏差,以使所需的连接下班!

I read completely documentation of NN in MATLAB. With the following command we can access to each connection and change their weights and bias so that the desired connection gets off duty!

For a NN with one hidden layer:

Network.IW{1,1} = The matrix of Input weights to Hidden layer.
Network.LW{2,1} = The matrix of Hidden layer weights to Output layer.
Network.b{1,1} = The matrix of bias between Input to Hidden layer.
Network.b{2,1} = The matrix of bias between Hidden layer to Output.

然后,我们可以根据需要将0设置为Input和Hidden层之间的那些连接(权重和偏置).通过这种配置,我们可以重新构建神经网络基础结构.

Then, we can set 0 to those connections (both weights and bias) between Input and Hidden layer as our desired. With this type of configuration, we can re-construct the neural network infrastructure.

这篇关于在MATLAB中的MLP神经网络中断开某些输入隐藏层的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆