Machine learning assisted synthetic acceleration of Ruddlesden-Popper and Dion-Jacobson 2D lead halide perovskites