Hopfield神经网络

时间:2009-06-01 21:49:46

标签: artificial-intelligence neural-network

你知道模式识别旁边的任何应用吗?是为了实现Hopfield神经网络模型?

3 个答案:

答案 0 :(得分:3)

递归神经网络(其中跳跃网络是一种特殊类型)用于序列学习中的几个任务:

  • 序列预测(将库存值的历史记录映射到下一个时间步的预期值)
  • 序列分类(将每个完整的音频片段映射到扬声器)
  • 序列标记(将语音片段映射到所说的句子)
  • 非马尔可夫强化学习(例如需要深度记忆作为T-Maze基准的任务)

我不确定你的“模式识别”是什么意思,因为它基本上是一个完整的领域,神经网络可以使用的每个任务都适合。

答案 1 :(得分:0)

您也可以使用Hopfield网络来解决优化问题。

答案 2 :(得分:0)

您可以结帐此存储库 - > Hopfield Network

在离线训练网络后,您有一个测试模式的示例。 这是测试

 @Test
 public void HopfieldTest(){
     double[] p1 = new double[]{1.0, -1.0,1.0,-1.0,1.0,-1.0,1.0,-1.0,1.0};
     double[] p2 = new double[]{1.0, 1.0,1.0,-1.0,1.0,-1.0,-1.0,1.0,-1.0};
     double[] p3 = new double[]{1.0, 1.0,-1.0,-1.0,1.0,-1.0,-1.0,1.0,-1.0};

     ArrayList<double[]> patterns = new ArrayList<>();
     patterns.add(p1);
     patterns.add(p2);

     Hopfield h = new Hopfield(9, new StepFunction());

     h.train(patterns); //train and load the Weight matrix

     double[] result = h.test(p3); //Test a pattern

     System.out.println("\nConnections of Network: " + h.connections() + "\n"); //show Neural connections
     System.out.println("Good recuperation capacity of samples: " + Hopfield.goodRecuperation(h.getWeights().length) + "\n");
     System.out.println("Perfect recuperation capacity of samples: " + Hopfield.perfectRacuperation(h.getWeights().length) + "\n");
     System.out.println("Energy: " + h.energy(result));

     System.out.println("Weight Matrix");
     Matrix.showMatrix(h.getWeights());
     System.out.println("\nPattern result of test");
     Matrix.showVector(result);

     h.showAuxVector();
 }

运行测试后,您可以看到

Running HopfieldTest

Connections of Network: 72

Good recuperation capacity of samples: 1

Perfect recuperation capacity of samples: 1

Energy: -32.0

Weight Matrix
 0.0        0.0     2.0    -2.0      2.0       -2.0       0.0       0.0     0.0
 0.0        0.0     0.0     0.0      0.0        0.0      -2.0       2.0    -2.0
 2.0        0.0     0.0    -2.0      2.0       -2.0       0.0       0.0     0.0
-2.0        0.0    -2.0     0.0     -2.0        2.0       0.0       0.0     0.0
 2.0        0.0     2.0    -2.0      0.0       -2.0       0.0       0.0     0.0
-2.0        0.0    -2.0     2.0     -2.0        0.0       0.0       0.0     0.0
 0.0       -2.0     0.0     0.0      0.0        0.0       0.0      -2.0     2.0
 0.0        2.0     0.0     0.0      0.0        0.0      -2.0       0.0    -2.0
 0.0       -2.0     0.0     0.0      0.0        0.0       2.0      -2.0     0.0

Pattern result of test 

 1.0        1.0     1.0     -1.0     1.0       -1.0      -1.0       1.0     -1.0
-------------------------
The auxiliar vector is empty

我希望这可以帮到你