aamini / introtodeeplearning

Lab Materials for MIT 6.S191: Introduction to Deep Learning
MIT License
7.26k stars 3.66k forks source link

Lab 1, Example song question #119

Open daniel-yj-yang opened 1 year ago

daniel-yj-yang commented 1 year ago

Hi, MIT Deep Learning!

Your Music Generation lab is so interesting. Thanks very much for building this and sharing with the world!

I have one question: Given that the LSTM is trained on 817 songs, is it possible that it simply memorizes every song as is, and is able to reproduce exactly a trained song from end to end? Or it is learning a supposedly generalizable pattern to predict the next characters? I assume it is the latter.

I have this question because when I played the 2nd example song (see below). I found that it sounds identical to the one you shared from a former student via twitter (https://twitter.com/AnaWhatever16/status/1263092914680410112?s=20). Is that even possible?

But I don't see how you split the original data into training/validation/test sets in order to evaluate overfitting and generalizability performance, either, although you have this line of code "idx = np.random.choice(n-seq_length, batch_size)" in get_batch(). Thus, it is unlikely that the LSTM learns any of the 817 songs as is.

# Download the dataset
songs = mdl.lab1.load_training_data()

# Print one of the songs to inspect it in greater detail!
example_song = songs[1]

Example song: 
X:2
T:An Buachaill Dreoite
Z: id:dc-hornpipe-2
M:C|
L:1/8
K:G Major
GF|DGGB d2GB|d2GF Gc (3AGF|DGGB d2GB|dBcA F2GF|!
DGGB d2GF|DGGF G2Ge|fgaf gbag|fdcA G2:|!
GA|B2BG c2cA|d2GF G2GA|B2BG c2cA|d2DE F2GA|!
B2BG c2cA|d^cde f2 (3def|g2gf gbag|fdcA G2:|!