Hopfield described the overall state of the network with a property that is equivalent to the energy in the spin system found in physics; the energy is calculated using a formula that uses all the values of the nodes and all the strengths of the connections between them. The Hopfield network is programmed by an image being fed to the nodes, which are given the value of black (0) or white (1). The network’s connections are then adjusted using the energy formula, so that the saved image gets low energy. When another pattern is fed into the network, there is a rule for going through the nodes one by one and checking whether the network has lower energy if the value of that node is changed. If it turns out that energy is reduced if a black pixel is white instead, it changes colour. This procedure continues until it is impossible to find any further improvements. When this point is reached, the network has often reproduced the original image on which it was trained.
霍普菲尔德使用一个等同于物理自旋系统中能量的属性来描述网络的整体状态;能量使用涉及所有节点值和所有连接强度的公式计算。霍普菲尔德网络通过将一幅图像输入到节点中而被编程,节点的值被设置为黑色(0)或白色(1)。然后使用能量公式调整网络的连接,使得保存的图像获得较低的能量。当另一种模式输入网络时,有一个逐个检查节点并查看该节点值的改变是否能使网络能量降低的规则。如果发现将一个黑色像素改为白色可以降低能量,则会改变颜色。这一过程一直持续到无法找到任何进一步的改进为止。达到这一点时,网络通常已经复制了其训练所依据的原始图像。