# A Hybrid CNN and RNN Variant Model for Music Classification
## 2 Related Work  
Music genre classification has a wide range of applications. These applications have used various methods of feature extraction and classifiers for the classification of music genre using machine- and deep-learning techniques as described in [10; 11; 12]. A machine-learning method based on support vector machine (SVM) and k-nearest neighbor (k-NN) was suggested in Reference [13]. This method was performed on the GTZAN dataset for the classification task. In order to extract the features from music samples, it used MFCC, and it obtained 64.4% and 77.78% accuracy for k-NN and SVM, respectively. Feature extraction with statistical description was also performed in Reference [14]. This work extracted eight features that were used with different machine-learning algorithms and achieved an accuracy of 72%. Further, they also extended their approach by using deep-learning techniques such as CNN. They implemented their work in three steps--creating raw data, using short-time Fourier transform (STFT) (hop count = 1024, window size = 2048), and MFCC by employing 13 coefficients--and obtained 66% accuracy. Similarly, multiple techniques for detecting and classifying GTZAN music datasets were compared in Reference [15], in which FFT and MFCC for the feature extraction is considered. They performed analysis using the machine-learning approaches \"decision tree\", \"k-NN,\" and \"RNN\" as classifiers. By implementing RNN, they obtained the highest accuracy of 86%. Further, in Reference [16], another model was implemented in two parts. First, the extracted features from music files were arranged in a specific format to be used in two architectures. Second, the sum rule was used to merge the two models. To show the final result, the discrete posterior probabilities were jointly used. The GTZAN dataset was used for the experiments, and nine distinct features were extracted in order to analyze the music pattern. Every feature considered input to two models, and results were merged for the final prediction. By combining the SVM and LSTM, they achieved an accuracy of 89%. To classify music, a model in Reference [17] considered eight characteristics of extracted audio files: beat periodicity, loudness, energy, speech, acoustic, valence, and danceability (discreet wavelet transformation, DWT). A neural network then took the input of these features. They performed the experiments on only two genres: classical and Sufi songs. Classical songs were predicted correctly with an accuracy of 87%, and the Sufi genre was predicted with an accuracy of 82%. Similarly, the study in Reference [18] used the GTZAN dataset with limited parameters and the global pooling approach to investigate a CNN-based network. However, they could only achieve a test accuracy of 70.60%, since they could not locate the temporal elements. The authors in Reference [19] also suggested the CNN design combined with a residual network. Still, due to a shortage of training examples, their experiments on the PMG dataset showed an accuracy of 86%. Additionally, a model suggested in [20] that attempted to classify the Free Music Achieve (FMA) dataset using CNN-based architecture showed limited performance, obtaining an accuracy rate of only 66.4%. Due to the audio's sequential nature, the variants of RNN, such as LSTM and GRU, have been proposed for music classification in References [21; 22]. In this work the tests were conducted on GTZAN, Emotiy, Ballroom, and LastFM by utilizing Mel-spectrograms for feature extraction. This work also compared all datasets and found GRU to be better than LSTM with reliable accuracy. In another work, [PERSON] [9] used the timbral texture, rhythm, pitch content, and statistical pattern recognition from the GTZAN dataset as well as real-time music with the accuracy of 60%. Owing to the immense advancement and effectiveness of neural networks in multiple classification tasks and also to the better forecasting results, a hybridization of CNN and variants of RNN is proposed.