Deep learning with kernels through RKHM and the Perron-Frobenius operator