Velocity model building is not straightforward in geologically complex environments. We train a convolutional neural network (CNN) to map full wavefields to smooth subsurface parameter distributions to address the problem. Specifically, cubes of neighboring CMP gathers are mapped into in 1D vertical profiles to simplify the training phase and to make it easier to utilize well logs in future applications. We train the CNN using a total of one hundred thousand random subsurface models generated on-the-fly and the corresponding synthetic data. The application of the trained CNN on synthetic and real data admitted reasonably accurate models representing mostly the low wavenumber features of the true models.