I\'m trying to implement image denoising as an optimisation problem by using gradient descent. I found this [article][1] with the same problem, however it is written in Matl