当前位置:网站首页>Matlab r2011b neural network toolbox precautions
Matlab r2011b neural network toolbox precautions
2022-07-03 15:08:00 【trium_ KW】
This is a record of the pit I encountered when using the neural network toolbox , For yourself and others . Write a little first , Update later .
1.
net = feedforwardnet;
net = train(net, attributes, targets);
The first line creates a two-layer feedforward network , The number of hidden layer neurons is the default 10, It's no problem . After creating the network , If you use view(net) To view the network topology , You will find that there are no input vectors and output vectors , This is because... Has not been called yet configure function .configure By default, the function is called for the first time train Function is automatically called . There's a pit here . hypothesis :
X = [
1 1 2;
2 1 3;
3 1 1;
2 1 3]';
Y = [
0 1 1 0];
That is, the input vector is 3 Dimension vector , Data sets X Contained in the 4 Samples , Training adopts batch training . after train After function call ,net.IW{1,1} The dimension of will become 10x2! Should not be 10x3 Do you ( notes : The number of neurons in the hidden layer 10, Input vector 3 dimension )? Because the dataset X The second attribute of all samples in is the same ( Values are 1), As a result, this attribute is Matlab Ignore it. , I don't know whether it was intentional or bug. resolvent
X(:,find(var(X,0,1) < eps)) = X(:,find(var(X,0,1))) + min(min(X))*1e-5*randn(size(X,1),length(find(var(X,0,1))));
namely , Add a small white noise to the ignored columns to make their values different .
边栏推荐
- 什么是one-hot encoding?Pytorch中,将label变成one hot编码的两种方式
- Byte practice surface longitude
- How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03
- 【日常训练】395. 至少有 K 个重复字符的最长子串
- redis单线程问题强制梳理门外汉扫盲
- Tensor ellipsis (three points) slice
- How does vs+qt set the software version copyright, obtain the software version and display the version number?
- Composite type (custom type)
- Open under vs2019 UI file QT designer flash back problem
- Class part2
猜你喜欢
第04章_逻辑架构
Basic SQL tutorial
There are links in the linked list. Can you walk three steps faster or slower
[set theory] inclusion exclusion principle (complex example)
Unity hierarchical bounding box AABB tree
What are the composite types of Blackhorse Clickhouse, an OLAP database recognized in the industry
【注意力机制】【首篇ViT】DETR,End-to-End Object Detection with Transformers网络的主要组成是CNN和Transformer
Introduction to opengl4.0 tutorial computing shaders
4-24--4-28
远程服务器后台挂起 nohup
随机推荐
Using Tengine to solve the session problem of load balancing
什么是Label encoding?one-hot encoding ,label encoding两种编码该如何区分和使用?
Centos7 deployment sentry redis (with architecture diagram, clear and easy to understand)
[pytorch learning notes] datasets and dataloaders
C string format (decimal point retention / decimal conversion, etc.)
B2020 points candy
Pytorch深度学习和目标检测实战笔记
cpu飙升排查方法
官网MapReduce实例代码详细批注
What is machine reading comprehension? What are the applications? Finally someone made it clear
使用JMeter对WebService进行压力测试
高并发下之redis锁优化实战
Search in the two-dimensional array of leetcode sword offer (10)
【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》
[graphics] real shading in Unreal Engine 4
[opengl] bone animation blending effect
从书本《皮囊》摘录的几个句子
[graphics] hair simulation in tressfx
[ue4] geometry drawing pipeline
Global and Chinese market of Bus HVAC systems 2022-2028: Research Report on technology, participants, trends, market size and share