Shear thickening in dense non-Brownian suspensions: Viscous to inertial transition