THE FREE-ENERGY OF A CLASS OF HOPFIELD MODELS