1. An image forming apparatus comprising: a photoreceptor; image forming means which includes the photoreceptor, and which carries out an operation for forming an image; density detection means for detecting a density of a toner image that is formed on the photoreceptor; initial density storage means for storing a density of the toner image in an initial state, the stored density having been detected by the density detection means; density-change detection means for detecting a change in density between the density stored in the initial density storage means and the density of a toner image that is detected by the density detection means after a plurality of image forming operations have been carried out by the image forming means; density-change storage means for storing the change in density that has been detected by the density-change detection means; and image-quality compensating means for learning a relationship between input data and teaching data, the input data being derived from the change in density stored in the density-change storage means, the teaching data being derived from a compensating amount that matches the change in density for a control value to be given to the image forming means, and for calculating a compensating amount for a control value that is suitable for the change in density stored in the density-change storage means, in accordance with the contents of the learning, upon executing an image forming operation; wherein the image-quality compensating means includes a neurocomputer of perceptron type that is constituted of an input layer, a hidden layer and an output layer.