Spectral unmixing is an important procedure to exploit relevant information from remotely sensed hyperspectral images. Each pixel spectrum is unmixed to some pure constitutions, endmembers, and their fractional values and abundances. The aim of this study is to improve neural network (NN)-based unmixing methods, which consist of linearly extracting endmembers, and nonlinearly estimating of abundances. In this seminonlinear method, we use fractional endmembers as inputs and pixel spectrum as output in a multilayer perceptron. Two types of samples are used as training data: (1) the most similar samples to each endmember (core of class) and (2) the most dissimilar samples to all endmembers (border of classes). After training of the network, an optimization step is proposed to model pixel spectrum forwardly. This step starts with initial abundances and optimizes them to obtain a desired pixel spectrum. Application of this method on Cuprite data shows a promising reconstructed image with an average root-mean-square error (RMSE) value of 0.0084. To evaluate the presented algorithm, it is compared with one linear and two nonlinear unmixing methods. The average RMSE values and study of error distribution showed that the proposed method can be accounted as a better selection.