Moved numerical gradient check to misc.