replace the min functions with smooth approximations which is a prerequisite for getting the accurate gradient information