No existing phase unwrapping technique achieves completely accurate unwrapping. Therefore, we trained a convolutional neural network for phase unwrapping on (flipped and scaled) brain images from 12 healthy volunteers. An exact model of phase unwrapping was used: ground-truth (label) phase images (unwrapped with an iterative Laplacian Preconditioned Conjugate Gradient technique) were rewrapped (projected into the 2π range) to provide input images. This novel model can be used to train any neural network. Networks trained using masked (and unmasked) images showed unwrapping performance similar to state-of-the-art SEGUE phase unwrapping on test brain images and showed some generalisation to pelvic images.