Two-Stage Solar Flare Forecasting Based on Convolutional Neural Networks