Machine learning for moduli space of genus two curves and an application to isogeny based cryptography