当前位置:网站首页>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 .
边栏推荐
- Puppet自动化运维排错案例
- [ue4] cascading shadow CSM
- Web server code parsing - thread pool
- Global and Chinese market of iron free motors 2022-2028: Research Report on technology, participants, trends, market size and share
- Basic SQL tutorial
- Yolov5进阶之九 目标追踪实例1
- [ue4] geometry drawing pipeline
- CentOS7部署哨兵Redis(带架构图,清晰易懂)
- 基于SVN分支开发模式流程浅析
- 【pytorch学习笔记】Transforms
猜你喜欢

C string format (decimal point retention / decimal conversion, etc.)
![[engine development] rendering architecture and advanced graphics programming](/img/a4/3526a4e0f68e49c1aa5ce23b578781.jpg)
[engine development] rendering architecture and advanced graphics programming

Functional modules and application scenarios covered by the productization of user portraits

Didi off the shelf! Data security is national security

Kubernetes 进阶训练营 Pod基础

cpu飙升排查方法

Unity hierarchical bounding box AABB tree
![[ue4] material and shader permutation](/img/8f/7743ac378490fcd7b9ecc5b4c2ef2a.jpg)
[ue4] material and shader permutation

Solve the problem that pushgateway data will be overwritten by multiple push

Yolov5 series (I) -- network visualization tool netron
随机推荐
Global and Chinese markets for infrared solutions (for industrial, civil, national defense and security applications) 2022-2028: Research Report on technology, participants, trends, market size and sh
Global and Chinese market of solder bars 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets for indoor HDTV antennas 2022-2028: Research Report on technology, participants, trends, market size and share
The method of parameter estimation of user-defined function in MATLAB
[opengl] geometry shader
Redis主从、哨兵、集群模式介绍
Finally, someone explained the financial risk management clearly
4-33--4-35
Introduction to opengl4.0 tutorial computing shaders
Global and Chinese market of marketing automation 2022-2028: Research Report on technology, participants, trends, market size and share
Chapter 14 class part 1
[graphics] hair simulation in tressfx
[opengl] bone animation blending effect
什么是embedding(把物体编码为一个低维稠密向量),pytorch中nn.Embedding原理及使用
Global and Chinese market of Bus HVAC systems 2022-2028: Research Report on technology, participants, trends, market size and share
Didi off the shelf! Data security is national security
【pytorch学习笔记】Transforms
.NET六大设计原则个人白话理解,有误请大神指正
什么是one-hot encoding?Pytorch中,将label变成one hot编码的两种方式
[transformer] Introduction - the original author of Harvard NLP presented the annotated transformer in the form of line by line implementation in early 2018