Nonlinear wavefront reconstruction with convolutional neural networks for Fourier-based wavefront sensors