A differentiable binary microlensing model using adaptive contour integration method