Q: What is causing such low accuracy for this LSTM? I am creating a musical key identification algorithm. I have about 50000 tracks. Each track is represented as a list of pitches (1 to 12). Since I want to classify each sequence of pitches into one of 24 categories (the key), I thought I would treat this similarly to a text classification problem. I copied an example online, using a one layer LSTM network. However, accuracy is very low (around 3%). As I am new to machine learning, I would be very grateful for any intuition on how to build an LSTM suitable for this problem. 
# Create Embedding (Input) Layer (max_words) --> LSTM Layer (128)
    model.add(Embedding(possible_notes+1,5,mask_zero = True))
    model.add(LSTM(5, dropout=0.2, recurrent_dropout=0.2))

    # LSTM Layer (128) --> Output Layer (num_classes)
    model.add(Dense(num_classes, activation='softmax'))

    # Add optimization method, loss function and optimization value
    model.compile(loss='categorical_crossentropy', 
                  optimizer='adam', metrics=['accuracy'])

    # "Fit the model" (train model), using training data (80% of dataset)
    model.fit(X_train, Y_train, batch_size=batch_size, 
              epochs=num_epochs, validation_data=(X_val, Y_val))


Here is example of output I am getting:
INFO    2019-07-20 18:45:38 +0200   master-replica-0        34000/42666 [======================>.......] - ETA: 16s - loss: 76.2733 - acc: 2.9412e-05
INFO    2019-07-20 18:45:40 +0200   master-replica-0        35000/42666 [=======================>......] - ETA: 14s - loss: 76.2733 - acc: 2.8571e-05
INFO    2019-07-20 18:45:42 +0200   master-replica-0        36000/42666 [========================>.....] - ETA: 13s - loss: 76.2733 - acc: 2.7778e-05
INFO    2019-07-20 18:45:44 +0200   master-replica-0        37000/42666 [=========================>....] - ETA: 11s - loss: 76.2733 - acc: 2.7027e-05
INFO    2019-07-20 18:45:46 +0200   master-replica-0        38000/42666 [=========================>....] - ETA: 9s - loss: 76.2733 - acc: 2.6316e-05 
INFO    2019-07-20 18:45:48 +0200   master-replica-0        39000/42666 [==========================>...] - ETA: 7s - loss: 76.2733 - acc: 2.5641e-05
INFO    2019-07-20 18:45:50 +0200   master-replica-0        40000/42666 [===========================>..] - ETA: 5s - loss: 76.2733 - acc: 2.5000e-05
INFO    2019-07-20 18:45:52 +0200   master-replica-0        41000/42666 [===========================>..] - ETA: 3s - loss: 76.2733 - acc: 2.4390e-05
INFO    2019-07-20 18:45:57 +0200   master-replica-0        42000/42666 [============================>.] - ETA: 1s - loss: 76.2733 - acc: 2.3810e-05
INFO    2019-07-20 18:45:57 +0200   master-replica-0        42666/42666 [==============================] - 87s 2ms/step - loss: 76.2733 - acc: 2.3438e-05 - val_loss: 76.2733 - val_acc: 0.0000e+00

I am running this model on Google Cloud Platform, using the basic_gpu setting.
Here is the command I run:
gcloud ai-platform jobs submit training $JOB_NAME \
--scale-tier BASIC_GPU \
--job-dir $OUTPUT_PATH \
--module-name trainer.task \
--package-path trainer/ \
--region $REGION \
--python-version 3.5 \
--runtime-version 1.4 \
-- \
--train-file gs://dissertation-models/Data/complete_dataset.csv \
--num-epochs 3 \
--batch-size 64

I've tried different batch sizes and number of epochs, always giving the same loss and similar low accuracy.

A: You're just not training on enough epochs. 50,000 samples need more than 3 epochs. and your LSTM network is too simple.
Also, I'd recommend working with the transformer model over LSTM. usually gives a better accuracy for voice/speech data.
