# Local Contrast Learning for One-Shot Learning
## 4 Experiments and Results
### Small Data Deep Learning
#### 4.2.2 Training Sample Amount  
The number of training classes and the number of samples per class jointly determine the classification accuracy. Generally, the increase in the amount of training samples results in the improvement of the classification accuracy. However, the balance between the number of classes and the sample number per class is a crucial factor in the classification performance. We conducted the relevant experiments, which are presented in Table 4.  
As the class number is fixed, the classification accuracy increases with the sample number per class. However, when the sample number per class is too low, the accuracy sharply goes down; for example, on Omniglot, the accuracy of experiment o2.3 is about 12% \begin{table}
\begin{tabular}{l l l l l l l l l l} \hline \hline \multirow{2}{*}{**ID**} & \multirow{2}{*}{**Training Dataset**} & \multirow{2}{*}{**Classes**} & \multirow{2}{*}{**Samples**} & \multirow{2}{*}{**Shots**} & **Average** & **Maximum** & **Minimum** & **Variance** & \multirow{2}{*}{**Amount**} \\  & & & & & **Accuracy** & **Accuracy** & **Accuracy** & **Accuracy** & **Accuracy** \\ \hline o2.1 & omniglot\_Latin & 26 & 20 & 1 & 66.86 & 67.50 & 66.00 & 0.15 & 520 \\ o2.2 & omniglot\_Korean & 40 & 20 & 1 & 52.39 & 53.50 & 51.50 & 0.26 & 800 \\ o2.3 - & omniglot & 964 & 2 & 1 & 83.42 & 85.67 & 80.83 & 1.55 & 1928 \\ o2.4 - & omniglot & 964 & 3 & 1 & 91.43 & 93.83 & 89.50 & 1.60 & 2892 \\ o2.5 - & omniglot & 964 & 5 & 1 & 95.22 & 96.17 & 93.33 & 0.69 & 4820 \\ o2.6 - & omniglot & 964 & 15 & 1 & 96.30 & 97.50 & 94.17 & 0.71 & 14,460 \\ o2.7 - & omniglot & 964 & 20 & 1 & 95.38 & 96.83 & 94.50 & 0.24 & 19,280 \\ \hline h2.1 & HWDB & 20 & 240 & 1 & 81.30 & 86.00 & 78.73 & 3.05 & 4800 \\ h2.2 & HWDB & 200 & 20 & 1 & 91.74 & 93.64 & 88.91 & 1.85 & 4000 \\ h2.3 & HWDB & 3155 & 2 & 1 & 62.25 & 66.55 & 57.45 & 4.08 & 6310 \\ h2.4 & HWDB & 3155 & 5 & 1 & 94.75 & 96.18 & 92.18 & 0.87 & 15,775 \\ h2.5 & HWDB & 3155 & 20 & 1 & 96.88 & 98.18 & 95.09 & 0.69 & 63,100 \\ h2.6 & HWDB & 3155 & 240 & 1 & 97.82 & 98.05 & 97.45 & 0.02 & 757,200 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of small data experiments on Omniglot and HWDB with 20-way accuracy (%). The network has 26 layers. ID with - means that the image sizes are 28 \(\times\) 28 and the images are not augmented by rotating; otherwise, the image sizes are 64 \(\times\) 64.  
less than that of experiment o2.5. On HWDB, due to it being more diverse than Omniglot, the decrease is more severe; it is about 33% (see experiments h2.3 and h2.4). On the contrary, if the class number is too low, the large sample number cannot result in high accuracy; for instance, in experiment o2.2 on Omniglot, the result of 40 classes and 20 samples per class is lowered to 52.39%. For another example, in experiment h2.1 on HWDB, the result of 20 classes and 240 samples per class is 81.30%; however, in experiment h2.2, the result of 200 classes and 20 samples per class is rises to 91.74%. Comparing the experiments o2.6 and o2.7 on Omniglot, with the increase of sample number per class and the amount, the classification accuracy declines. The reason for the decline is that more training data need more training steps; however, the steps of o2.6 and o2.7 are the same. More training data (more classes and more samples per class) can make the one-shot classification more steady and robust. Comparing experiments o2.4 and o2.7, although the accuracy does not largely improve with the sample increase, the accuracy variance of o2.7 sharply comes down relative to o2.4, from 1.60% to 0.24%. There are similar tendencies in the HWDB; for example, from experiment h2.5 to h2.6, the accuracy variance ranges from 0.69% to 0.02%. The diversity of the training data can improve the accuracy. Comparing the experiments o2.2 and o2.1 on Table 4, the accuracy with 40 classes in o2.2 is less than the accuracy with 20 classes in o2.1. The reason is that the letters in the Korean alphabet are more similar to each other in shape than the Latin alphabet.