这个神经网络的尺寸,即(4个输入,2个隐藏层,每个X神经元等)

时间:2016-12-19 19:05:39

标签: machine-learning neural-network tensorflow artificial-intelligence mnist

我正在查看Aymeric Damien(https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/3_NeuralNetworks/multilayer_perceptron.py)的张量流示例,并在weights中使用神经网络对MNIST数字进行分类。我认为他正在使用 784输入的神经网络,其中2个隐藏层各有256个神经元,10个输出。我对么? polygon_perceptron.py中的biasespublic interface ThingRepository extends JpaRepository<Thing, Long>{ @Query("select t from Thing t .....") public List<ThingProjection> findBySomeCriteria(...); } 中的矩阵维度与ANN“维度”(每个隐藏层中的#inputs,#hidden layer,#output,#neurons,等等。 谢谢!

1 个答案:

答案 0 :(得分:0)

这是一个3层神经网络(2个隐藏层和一个输出层)。

第一个隐藏层的输入之间的连接具有784 x 256个权重,具有256个偏差。这种配置是由于784个输入中的每一个完全连接到256个隐藏层节点,每个隐藏层节点都有1个偏差。

由于各层之间的完全连接,第一个隐藏层与第二个隐藏层之间的连接具有256 x 256个权重。第二层的256个节点各有1个偏差。

第二个隐藏层和输出层之间的连接类似。有256 x 10个权重(对于第二个隐藏层的256个节点和输出层的10个节点),每个输出节点有1个偏差。

因此有785 * 256 + 256 * 256 + 256 * 10 = 269,056权重和256 + 256 + 10 = 522偏差。

下图应该完整解释。

enter image description here

相关问题