On the capability of artificial neural networks to compensate nonlinearities in wavelength sensing