Deep learning for centre manifold reduction and stability analysis in nonlinear systems