Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hopfield Network in Keras

Is it possible to implement a Hopfield network through Keras, or even TensorFlow? Something like newhop in MATLAB?

like image 430
Prabaha Avatar asked Jun 06 '17 16:06

Prabaha


People also ask

What is Hopfield network used for?

The Hopfield Neural Networks, invented by Dr John J. Hopfield consists of one layer of 'n' fully connected recurrent neurons. It is generally used in performing auto association and optimization tasks.

Is Hopfield network RNN?

According to Wikipedia: "The Hopfield network is an RNN in which all connections are symmetric." Other types of RNN that are not Hopfield networks are: Fully reconnect, recursive, Elman, Jordan and more.

What is the disadvantage of Hopfield network?

One of the major shortcomings of Hopfield neural network (HNN) is that the network may not always converge to a fixed point. HNN, predominantly, is limited to local optimization during training to achieve network stability.

Is Hopfield network supervised or unsupervised?

The learning algorithm of the Hopfield network is unsupervised, meaning that there is no “teacher” telling the network what is the correct output for a certain input.


1 Answers

Here is a simple numpy implementation of a Hopfield Network applying the Hebbian learning rule to reconstruct letters after noise has been added:

https://github.com/CCD-1997/hello_nn/tree/master/Hopfield-Network

Depending on your particular use case, there is the general Recurrent Neural Network architecture support in Tensorflow, mainly geared towards language modelling. Additionally, Keras offers RNN support too.

like image 93
Dylan Hogg Avatar answered Oct 04 '22 04:10

Dylan Hogg