为神经网络确定适当数量的神经元 [英] Determining the proper amount of Neurons for a Neural Network

查看:153
本文介绍了为神经网络确定适当数量的神经元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在用神经网络进行一些研究,整个概念和理论对我来说都是有意义的.尽管我还没有找到答案,但仍然存在的一个问题是,在神经网络中应使用多少个神经元.以获得适当/有效的结果.包括隐藏层,每个隐藏层的神经元等.更多的神经元是否必然会获得更准确的结果(在对系统施加更多负担的同时)还是更少的神经元仍然足够?是否有某种管理规则可以帮助确定这些数字?它是否取决于正在神经网络中实现的训练/学习算法的类型.是否取决于呈现给网络的数据/输入的类型?

如果它更易于回答问题,我很可能会使用前馈和反向传播作为训练和预测的主要方法.

顺便说一句,是否有通常被归类为最佳/最实用"的预测算法/射击规则或学习算法,或者还取决于呈现给网络的数据类型? /p>

感谢任何人的投入,我们始终感激不尽!

关于C#标记,这是我将组合神经网络的语言.如果这些信息有帮助的话.

解决方案

我在大学里专门研究AI/NN,并且在游戏上有一些敏捷的经验,这就是我作为指南所发现的入门.但是请意识到,每个NN都需要进行一些调整才能在您选择的环境中发挥最佳效果. (一个潜在的解决方案是将您的程序暴露于数千个不同的NN,设置可测试的性能标准,然后使用遗传算法传播更有用的NN并剔除不太有用的NN-但这是另一个很大的篇幅... )

我发现-一般而言

  • 输入层-每个输入向量一个AN + 1个偏置(总是1个)
  • 内层-将输入层加倍
  • 输出层-每个动作或结果一个AN

示例:字符识别

  • 如果您要检查10x10的网格以进行字符识别;
  • 从101输入AN开始(每个像素一个,外加一个偏置)
  • 202内部AN
  • 并输出26个AN(每个字母一个)

示例:二十一点

  • 如果您要构建NN以在二十一点上取胜";
  • 从16个输入AN开始(13个用于计算一张牌的出现次数,1个用于玩家手牌价值,1个用于发牌人的上牌"和1个偏差)
  • 32个内部AN
  • 和6个输出AN(其中一个用于命中",停留",拆分",双",投降"和保险")

I have been doing some research with neural networks and the concept and theory as a whole makes sense to me. Although the one question that sticks out to me, which I haven't been able to find an answer to yet, is how many neurons should be used in a Neural Net. to achieve proper/efficient results. Including Hidden Layers, neurons per Hidden Layer, etc. Do more neurones necessarily more accurate results (while being more taxing on the system) or will less neurons still be sufficient? Is there some sort of governing rule to help determine those numbers? Does it depend on the type of training/learning algorithm that is being implemented into the neural net. Does it depend on the type of data/input that is being presented to the network?

If it makes it easier to answer the questions, I will most likely be using feedforwarding and backpropogation as the main method for training and prediction.

On a side note, is there a prediction algorithm/firing rule or learning algorithm that is generally regraded to as "the best/most practical", or is that also dependant on the type of data being presented to the network?

Thanks to anyone with any input, it's always appreciated!

EDIT: Regarding the C# tag, that is the language in which I'll be putting together my neural network. If that information helps at all.

解决方案

I specialized in AI / NN in College, and have had some ameture experience working on them for games, and here is what I found as a guide for getting started. Realize, however, that each NN will take some tweaking to work best in your chosen environment. (One potential solution is to expose your program to 1000s of different NNs, setup a testable criteria for performance and then use a Genetic Algorithm to propagate more useful NNs and cull less useful NNs - but that is a whole other very large post...)

I found - in general

  • Input Layer - One AN for each input vector + 1 Bias (always 1)
  • Inner Layer - Double the Input Layer
  • Output Layer - One AN for each Action or Result

Example: Character Recognition

  • If you are examining a 10x10 grid for character recognition;
  • start with 101 Input AN (one for each pixel, plus one bias)
  • 202 Inner AN
  • and 26 Output AN (one for each letter of the alphabet)

Example: Blackjack

  • If you are building a NN to "win at blackjack";
  • start with 16 Input AN (13 to count each occurance of a card, 1 for player hand value, 1 for dealer "up-card", and 1 bias)
  • 32 Inner AN
  • and 6 output AN (one for "Hit" "Stay" "Split" "Double" "Surrender" and "Insurrance")

这篇关于为神经网络确定适当数量的神经元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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