Optimal transport flow and infinitesimal density ratio estimation