Latent Dynamics Networks (LDNets): learning the intrinsic dynamics of spatio-temporal processes