Computational spectrometers are explored to overcome the disadvantages of large size, narrow bandwidth and low spectral resolution suffered by conventional spectrometers. However, expensive spectral encoders and unstable algorithms impede widespread applications of the computational spectrometers. In this paper, we propose a neural network (NN)-based miniaturized spectrometer with a frosted glass as its spectral encoder. The frosted glass has the merits of easy fabrication, low loss, and high throughput. In order to evaluate the reconstruction ability, several frequently used algorithms such as the multilayer perceptron (MLP), convolutional neural network (CNN), residual convolutional neural network (ResCNN), and Tikhonov regularization are adopted to reconstruct different types of spectra in sequence. Experimental results show that the reconstruction performance of the MLP is better than other algorithms. By using the MLP network, the average mean squared error is 1.38 × 10-3 and the reconstruction time is 16 µs. At the same time, a spectral resolution of 1.4 nm and a wavelength detection range of 420 nm-700 nm are realized. The effectiveness of this approach is also demonstrated by implementing a reconstruction for an unseen multi-peak spectrum. Equipped with the size, low cost, real time, broad-band, and high-resolution spectrometer, one may envision many portable wavelength analysis applications.