Adding gradient checker.