The limb sounder radiometer on board the satellite Odin is the first instrument measuring emission from space in the submillimeter region to map atmospheric species. Nonlinear inversions of Odin spectra by iterative approaches are computationally very intensive, so a faster neural network technique has been developed. The technique is tested here by inverting simulated observations in the 544.2-545.0 GHz band, retrieving O3 by the neural networks and an optimal estimation approach based on the Marquardt-Levenberg algorithm. Special consideration is given here to the implementation of a spectral reduction technique and the treatment of the main random uncertainties. The reduction technique is based on deriving spectral eigenvectors from the weighting functions of the observations and successfully reduced the dimensionality of the spectral space by two orders of magnitude. The random uncertainties are treated by incorporating their possible realizations into the training sets, and inversion of simulated spectra with thermal noise, temperature, and pointing uncertainties gave similar retrieval errors for the neural networks and optimal estimation, with the neural networks being much faster. However, a problem remains because optimal estimation can easily incorporate last-minute a priori information that reduces the random uncertainty and subsequently the retrieval error, but it is not so easy for the neural networks to incorporate the same information.