## 4 Sound Event Classification Systems
### CNN-Based Models
#### 4.1.2 Architecture of the Classifiers  
Both proposed novel systems take the input data described before, but the difference between them is the CNN branch that processes the log-Mel spectrogram part. The first architecture, Figure 2a, uses three blocks of convolutional layers (ConvBlock), while the second one, Figure 2b, uses a ResNet. They are described in detail in the following subsections.  
For both systems, the output of the CNN branch was concatenated with the OpenL3 embeddings. The resulting combined parameter vector was used as input for a fully connected layer with 128 neurons with 50% dropout. Finally, a softmax layer was used to produce the classification scores. The systems were implemented using the Keras API.  
ConvBlock Branch  
The first of the systems used a CNN branch based on three convolutional blocks. Each convolutional block (Figure 3) consisted of a 2D convolutional layer with a kernel size of (3 \(\times\) 3), and a (2,2) stride. After each convolutional layer, we applied batch normalization, ReLU activation and max pooling with a pool size of (3 \(\times\) 2) and a stride of (1,2). Each of the blocks had a decreasing number of convolutional filters (f): 256, 128 and 64.  
Figure 2: Developed architectures, (**a**) Sound event classification system based on ConvBlock, and (**b**) sound event classification system based on ResNet.  
ResNet Branch  
The CNN branch of the second system was based on a ResNet. We developed this architecture based on ResNet50 [21] with some design and implementation details inspired by [48].  
The ResNet branch (shadowed in grey in Figure 2b) consisted of an input stage, 10 groups of convolutional and identity blocks (CBIB) and a MaxPooling layer. The input stage Figure 2b consisted of a 2D convolutional layer with 256 filters, a kernel size of (3 \(\times\) 3) and a stride of (1,1). After the convolutional layer, we used batch normalization, ReLU activation and a MaxPooling layer with a pool size of (2,2) and the same stride size.  
After the input stage, 10 CBIB blocks were stacked. Each CBIB block consisted of a Convolutional Block (CB) followed by an Identity Block (IB). The number of blocks, the number of layers and their respective number of filters were chosen after carrying out different tests in which we modified these hyperparameters. Those experiments were performed in previous works with other datasets and in this paper, we presented the architectures that obtained the best results. The CB block, Figure 4, consisted of three 2D convolutional layers on the main branch and a shortcut with one 2D convolutional layer. The Conv2D layers of the main branch had a decreasing number of filters (f1, f2, f3) with (256, 128, 64) values. The first Conv2D layer and the shortcut had a different stride (s,s) depending on the position of the CBIB block in the stack, while the rest of the layers had a fixed value of (1,1). The stride (s) values assigned to the CB blocks were (2,2) for the 3 rd, 6 th and 9 th CBIB blocks and (1,1) for the rest of them. The stride values followed the original ResNet50 [21], but without downsampling on the 2 nd, 5 th and 8 th CBIB blocks. The shortcut consisted of a Conv2D with the same number of filters as the third Conv2D (64), a kernel size of (1 \(\times\) 1) and a stride of (s,s), which was 1 or 2 depending on the number of blocks, as explained before. The outputs of the CB blocks and the shortcut branch were added to use them as the input of the identity block, as shown in Figure 4.  
The configuration of the identity block is similar to the convolutional block, except for the stride value, which is 1 for all layers; and the shortcut, where there is no Conv2D layer.