Convolution neural network(CNN) has been widely applied in many fields and achieved excellent results, especially in image classification tasks. As we all know, many factors affect the performance of image classification. In particular, the size of training data sets and the number of categories are important factors affecting performance. While for most people, a large number of training data set are difficult to obtain or need to do a classification task with a large number of categories. Thus, we consider two questions of this approach: How does the size of the data set affect performance? How does the number of categories affect performance? In order to figure out these two questions, we constructed two types of experiment: Experiment 1, changing the number of categories and exploring how the number of categories affects performance in image classification task. There are 7 groups experiment performed by increasing the number of categories and performed 5 times experiment in each group (35 times experiment in total). Observe the change in accuracy to analyze the impact of the number of categories on performance. Experiment 2, changing data set size and exploring how the data set size affect performance. For each k-classification experiment, we do 5 groups by increasing the size of the training set. There are 35 groups experiment performed 5 times experiment in each group (175 times experiment in total). Observe changes in accuracy to analyze the effect of data set size on performance. For the CNN-based network, the results of experiment 1 show that the more categories, the worse the performance, and the less categories, the better the performance. In addition, when the number of categories to be classified is large, sometimes better accuracy can be obtained. The results of experiment 2 show that the larger the training set, the higher the test accuracy. When the training data set are insufficient, better results can be obtained. Therefore, in classification experiment, when the data set size is small or the number of categories is large, we can do more experiments and retain the best results. Results of this paper not only can guide us to do experiments on image classification, but also have important guiding significance for other experiments based on deep learning.