add the function of CNN.