Gated Differentiable Image Processing