Aligning seismic images is important in many areas of seismic processing such as time-lapse studies, tomography, and registration of compressional and shear-wave images. This problem is especially difficult when the misalignment is large and varies rapidly and when the images are not shifted versions of each other because they are either contaminated by noise or have different phase or frequency content. In addition, the images may be related by multidimensional vector-valued shift functions. We have developed a fast, scalable, and end-to-end trainable convolutional neural network (CNN) for seismic image registration. The concept of optical flow is widely applied to the problem of image registration using variational methods. Recent developments in the field of computer vision have shown that optical flow estimation can be formulated as a supervised machine learning task and can be successfully solved using CNNs. We train our CNN, SeisFlowNet, on images warped with known shifts and corrupted with noise, frequency, and phase perturbations. We evaluate the promising performance of the trained SeisFlowNet with synthetic data sets where the shift function is known and the images are contaminated with noise and other perturbations. The accuracy of the results obtained with SeisFlowNet is favorably compared with two other popular methods for seismic registration: windowed crosscorrelation and dynamic image warping. Further, we highlight the principles adopted to create training data sets and the advantages and disadvantages of the method.