Update gabor and gradient implementation.