## 3 Materials and Methods
### Model-Training Approaches
#### 3.2.2 Training the Preact ResNet-18 Model with Data Augmentation  
Building upon the previous approach, this strategy (Figure 3) incorporated data augmentation, a widely used technique in image recognition tasks. Although the base model remained the same, the input images were augmented slightly because any abnormal rotation or translation can transform one kanji to another. Specifically, the applied augmentations included random rotations within a narrow range (\(\pm\)15 degrees), minor horizontal and vertical translations (of up to 10% of the image's dimension), random cropping combined with subtle resizing (scaling between 95% and 105% of the original area before resizing to the target 64 \(\times\) 64 resolution), and slight shear transformations (up to 0.05). These carefully controlled transformations aimed to simulate minor variations in the writing angle, position, scale, and slant often encountered in handwritten characters, without introducing distortions severe enough to fundamentally alter the kanji's identity. Figure 3: Approach for “training the Preact ResNet-18 model with data augmentation”. Figure 2: Approach for “training the Vanilla Preact ResNet-18 model”. 3.2.3. Training the Preact ResNet-18 via Cross-Language Transfer Learning with the Last Layer Unfrozen (Algorithm 1)  
One of the possible approaches for training the Preact ResNet-18 model involves using the \"Transfer Learning with the Last Layer Unfrozen\" algorithm [21]. In this method, all the layers of the network are frozen except for the fully connected layer, which is fine-tuned in the target dataset. A simplified illustration of this approach is shown in Figure 4. However, its main drawback is that it fails to achieve sufficient recognition accuracy for multiclass classification tasks, especially when dealing with a large number of classes. Therefore, this paper proposes a slightly different approach, which is based on the concept of cross-language transfer learning with the last layer unfrozen. The main idea is to obtain the initial weights with the dataset that contains Chinese handwritten characters and fine-tuning the main model with the dataset that contains Japanese handwritten kanji (Algorithm 1). Similar to traditional transfer learning with only the last layer unfrozen, our adapted algorithm (Algorithm 1) reduces the training time and resource consumption (excluding the time spent obtaining the initial weights). However, the use of cross-language transfer learning with the last layer unfrozen allows us to find the initial weights that are closer to the deeper loss basin with deeper local minima; it leads to a better performance. 3.2.4. Training the Preact ResNet-18 Model via Cross-Language Transfer Learning with the Last Layer Unfrozen (Algorithm 2)  
The previous approach, which is traditional transfer learning with the last layer unfrozen, often fails in approaching close enough to the loss's local minimum, which leads to insufficient kanji recognition accuracy. Therefore, an alternative training approach, known as transfer learning with all the layers unfrozen [22], is also considered. Similar to the previous algorithm, this strategy also employed transfer learning but took it a step further by unfreezing all the layers (Figure 5). Although this approach demands more computational resources and time in comparison with those of Algorithm 1, it allows the model to fine-tune all the parameters, potentially leading to a better performance. Similar to Algorithm 1, Algorithm 2 also presents an adaptation of transfer learning with all the layers unfrozen, incorporating the concept of cross-language transfer learning. The main idea is that, identical to the previous case (Algorithm 1), this algorithm (Algorithm 2) helps us to obtain the initial weights that are positioned closer to a deeper loss basin with a more stable local minimum, leading to a better model performance. Figure 4: Approach for “training the Preact ResNet-18 model via cross-language transfer learning with the last layer unfrozen” (Algorithm 1).