## 4 Discussion
Therefore, integer post-training quantization with the use of a calibration dataset is the next solution level. The quantization process itself is efficient, requiring approximately 37 s on a conventional GPU-based platform to process a calibration dataset of around 4300 samples, with negligible quantization time differences between integer and full-integer quantization methods (Figure 6). However, our findings reveal that using the entire calibration dataset results in a quantization error of approximately 2%, which is not optimal (Figure 8). Consequently, additional design time is necessary to identify the optimal selection of representative data from the calibration dataset, specifically determining both the RDS size and content that can minimize quantization error. In this study, we evaluate three practical strategies for RDS selection based on randomness, rhythm type, and ECG amplitude (Figure 7), using an extended set of 1300 RDS configurations for each strategy. As shown in Figure 8, no significant differences are observed between the RDS selection strategies in terms of the provided min-max ranges for the quantization error MAE(pVF). Nevertheless, Figure 9 reveals that the random RDS selection consistently achieves minimal error. For integer quantization, a single randomly selected RDS with a size ranging from 80 to 1000 cases produces errors between 0.6% and 1.8% (Figure 8, top). Interestingly, smaller RDS sizes closer to 80 samples consistently result in lower minimal errors (Figure 9, left). In contrast, full-integer quantization presents a broader error range, spanning from 0.7% to 4.5% (Figure 8, bottom), although the minimal error is similarly achieved with an RDS size of 80 samples (Figure 9, right). Table 4 reveals that both non-quantized and quantized LiteRT DNNs reproduce the shock advisory accuracy of the reference TF DNN model, generalized for a large test set  
with 7482 ECGs from OHCA interventions. All DNN models definitively fulfil the AHA performance goals for arrhythmia analysis algorithms in AEDs [84], presenting Se = 98.6% for VF (goal >90%), Sp = 99.6-100% for NSR (>99%), Sp = 98.9% for ONR (>95%), and Sp = 99.5-99.7% for asystole (>95%). As illustrated in Figure 10, the IntQ and Full-IntQ models present only 7 and 11 cases (0.1% of total test dataset) with inversed shock-advisory decisions, respectively. Reviewing these cases in Figure 11 reveals ECG signals with various morphologies, including tall T-waves, or rapid heart rate, or low and wide QRS complexes, or asystoles with low- and high-amplitude noises, all of which can present a challenge to any VF detection algorithm. To the best of our knowledge, the only study that has validated a CNN model for VF detection on the hardware of an AED for which it was specifically designed is by [PERSON] et al. (2023) [74] (see Table 5 for details). This study reported comparable shock advisory accuracy evaluated under specific embedded system constraints (Se = 98%, Sp = 100%), giving a result within 383 \(\pm\) 29 ms after processing a 7 s raw ECG signal sampled at 300 Hz. Notably, this is about 1.6 times faster than the execution time of our low-resource ARM Cortex-M7 microcontroller (615 \(\pm\) 0.5 ms for processing of 10 s ECG input), although both CNN implementations support almost real-time shock advisory feedback within 5-6% of the data collection time. Execution time variations are likely attributable to differences in the hyperparameters of the pre-trained CNN models. Although both models include five convolutional layers with a comparable number of filters, the kernel sizes differ (10 in this study vs. 3 in [74]), resulting in approximately 2.3 times more parameters in our model (7521 vs. 3200 as inferred from the network description in [74]). A similar impact of the total amount of trainable parameters, combined with the influence of different activation functions in DNNs, has been reported by [PERSON] et al. [87].