Ideally the deformation field from one image to another should be invertible and smooth to register images bidirectionally and preserve topology of anatomical structures. In traditional registration methods, differential geometry constraints could guarantee such topological consistency but are computationally intensive and time consuming. Recent studies showed that image registration using deep neural networks is as accurate as and also much faster than traditional methods. Current popular unsupervised learning-based algorithms aim to directly estimate spatial transformations by optimizing similarity between images under registration; however, the estimated deformation fields are often in one direction and do not possess inverse-consistency if swapping the order of two input images. Notice that the consistent registration can reduce systematic bias caused by the order of input images, increase robustness, and improve reliability of subsequent data analysis. Accordingly, in this paper, we propose a new training strategy by introducing both pair-wise and group-wise deformation consistency constraints. Specifically, losses enforcing both inverse-consistency for image pairs and cycle-consistency for image groups are proposed for model training, in addition to conventional image similarity and topology constraints. Experiments on 3D brain magnetic resonance (MR) images showed that such a learning algorithm yielded consistent deformations even after switching the order of input images or reordering images within groups. Furthermore, the registration results of longitudinal elderly MR images demonstrated smaller volumetric measurement variability in labeling regions of interest (ROIs).