In this paper the authors present a new option pricing scheme which deals with a nonconstant volatility for the price of the underlying asset. The main feature of the proposed pricing scheme consists of exploiting recent developments about Bayesian learning within the artificial neural networks framework. Indeed, the Bayesian learning aproach allows the data to speak for itself, i.e., to make a few general assumptions about the process to be modeled and to exploit all the available data concerning the price of traded options for modeling the implied volatility surface. The nonparametric model of the implied volatility surface, obtained through an infinite feedforward neural network and by exploiting the Bayesian formulation of the learning problem, is used within the proposed option pricing scheme. This pricing scheme relies upon the Dupire formula, which maps the implied volatility surface to the corresponding local volatility function. Numerical experiments for the case of the USD/DM over-the-counter options are presented together with a graphical analysis of the resulting smiles which attest to the effectiveness of the overall approach to option pricing.