## 2 Methods
### Proposed CNN Structure  
To enhance the precision of EEG signal classification for MI, the authors of [7] designed a parallel CNN structure. Specifically, they combined three separate frequency bands as the input and constructed a composite convolutional scale by allocating each frequency band to a corresponding convolutional layer with three varying scales of the convolutional kernel. This method improves the performance of feature extraction from high-dimension information in the input data. To enhance the classification of MI, the authors of [13] presented a CNN model with a parallel multi-scale filter bank. They adopted time-scale convolutional kernels to heighten the model's efficiency. Subsequently, they utilized four distinct time-domain images as the input to effectively extract features.  
CNNs have been widely used in processing only time- or frequency-domain images as the input. However, given the continuity and complexity of the EEG signal itself, it is difficult to extract sufficient features through only the frequency- or time-domain dimensions. Therefore, we propose a novel multi-input time-frequency CNN structure for this situation.  
Event-related desynchronization (ERD) and event-related synchronization (ERS) ordinarily appear inside the scope of alpha rhythms (7-14 Hz) and beta rhythms (14-30 Hz), with slight variations noted across various articles [28; 29].  
Therefore, we focused our study on these two rhythms.  
Our parallel CNN is displayed in Figure 1. We first converted the signals into time-frequency images of alpha and beta rhythms utilizing CWT. These images were then taken care of as the input through two comparative minor CNN structures. The convolutional neural network architecture utilized in this study includes two layers, each comprised of 32 and 64 convolutional kernels measuring 5 \(\times\) 5, with stride step sizes of 2 \(\times\) 2, respectively. The proposed model incorporates Rectified Linear Units (ReLUs) as its activation function, which enhances classification accuracy and accelerates learning in our model. To avoid overfitting, the model is regularized using L2 regularization. Throughout the preparation, we set the L2 regularization boundary to 0.01 and utilized the Adam optimizer. The learning rate was laid out at 0.1 at the beginning, with an automatically adjusted learning rate during the training. The model was trained for 100 epochs; more epochs would make the model learn better, but would easily lead to overfitting. Batch size was used to estimate the gradient in each iteration. A larger batch size leads to a more accurate estimate of the gradient and faster computation due to parallel processing, but requires more memory. On the other hand, it can offer regularization benefits but might result in noisy gradient estimates and slower training with smaller batch sizes. The batch size for this study was 64. An early stopping mechanism was employed in the training phase to moderate the overfitting. Specifically, the training blocked if the validation loss failed to decrease for five consecutive epochs. This ensured that a well performing weights were retained, which would work well with future signals. We considered the limitation of data size, optimized the network parameters, and deleted the pooling layer to avoid the loss of effective features.  
The resulting feature image from both minor regions were processed by a fully connected layer to convert them into a 1D vector. Subsequently, the 1D features extracted from both branches were concatenated into a single 1D vector, which was used for the classifier as the input. We used three normally utilized classifiers--specifically DT, softmax, and SVM. Furthermore, the pooling layer was wiped out to streamline the model system and forestall the deficiency of sampling [30].