# Transfer Learning-Based Classification of Maximly Sinus Using Generative Adversarial Networks
## 3 Methodology
### Image Generation Using GANs
#### 3.4.1 Lightweight GAN
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Training Parameters** & **Moderate Class** & **Severe Class** \\ \hline Network Capacity & 16 & 16 \\ \hline Batch Size & 32 & 32 \\ \hline Learning Rate & \(2\times 10^{-4}\) & \(1\times 10^{-5}\) \\ \hline Residual Layers & None & None \\ \hline Training Steps & 100,000 & 120,000 \\ \hline Dual-Contrast Loss & Yes & Yes \\ \hline Augmentation & 0.25 (25\%) & 0.9 (90\%) \\ \hline Augmentation Types & Cutout, Translation & Color, Cutout, Offset, Translation \\ \hline Save Models Interval & Every 1000 steps & Every 1000 steps \\ \hline Adjustments & Augmentation increased to 0.65 at 20,000 steps, & - \\  & Learning rate decreased to \(1\times 10^{-4}\) & - \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Training parameters for ‘lightweight GAN’ in Moderate and Severe classes. 'D' represents the discriminator loss, indicating how effectively the discriminator distinguishes between real and generated data; lower values signify superior performance. Conversely, 'G' denotes the generator loss, reflecting the generator's ability to produce data indistinguishable from real data; lower generator loss values indicate better performance. 'GP' signifies Gradient Penalty, a regularization technique crucial for stabilizing discriminator training in Wasserstein GANs by ensuring gradients are close to 1, thereby mitigating mode collapse and enhancing training stability. Finally, 'SS' represents the self-supervised learning loss, utilized in lightweight GANs to facilitate the discriminator's learning of data representations; lower SS loss values indicate improved performance in this self-supervised learning process. A low discriminator loss might indicate that the discriminator is performing well, but if the generator loss is very high, this could suggest that the generator is not able to fool the discriminator, which might result in poor-quality generated images. Similarly, a low self-supervised loss might suggest that the discriminator is learning useful representations of the data, but this does not necessarily guarantee that these representations will result in high-quality generated images. Recognizing the impact of the variability induced by the small size of the input images in the training process, two data generation phases were incorporated. Firstly, during the 100,000 training steps for the 'Moderate' class, 100 models were systematically saved to a designated directory. For each of these saved models, a total of 292 images were generated, aligning with the number of true images. Similarly, for the 'Severe' class, a data generation phase was implemented during the 120,000 training steps, saving 120 models. Correspondingly, for each saved model, 264 images were generated, mirroring the number of true images. These iterative data generation processes aimed to address the variability in the generator and discriminator loss and capture the intricacies of the training dynamics, ultimately producing synthetic images that comprehensively represent the diversity inherent in the training dataset. The visualization of the performance evaluation metrics in both classes is shown