Machine learning to enhance the calculation of optical forces in the geometrical optics approximation