An automated remaining useful life (RUL) prediction technique based on a deep learning network is proposed in this study for an end-to-end RUL prediction of rolling element bearings. The technique utilizes a Convolutional Neural Network (CNN) to learn the spatial features from the bearing condition monitoring data, and then employs a stack of Bidirectional Gate Recurrent Units (BGRU) to extract the temporal degrading trend from the data for a more accurate RUL prediction. A weighted average method is employed to smooth out the trend of the RUL prediction. The effectiveness of the proposed technique is validated using two bearing degradation datasets, and the advantage of the proposed technique is examined by comparing the predicted RUL with those predicted using other commonly employed deep learning techniques. It is shown that the proposed technique can yield a much more accurate result for the bearing RUL prediction than other commonly employed deep learning techniques.