From 7161590fe306578ad02d851e74e1141bd39004af Mon Sep 17 00:00:00 2001 From: Damon Gwinn <15755242+gwinndr@users.noreply.github.com> Date: Wed, 25 May 2022 20:01:12 -0400 Subject: [PATCH] Fix setting tgt when using a dataset with a performance less than the max sequence length --- dataset/e_piano.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataset/e_piano.py b/dataset/e_piano.py index a43e67d..024e564 100644 --- a/dataset/e_piano.py +++ b/dataset/e_piano.py @@ -89,7 +89,7 @@ def process_midi(raw_mid, max_seq, random_seq): if(raw_len < full_seq): x[:raw_len] = raw_mid tgt[:raw_len-1] = raw_mid[1:] - tgt[raw_len] = TOKEN_END + tgt[raw_len-1] = TOKEN_END else: # Randomly selecting a range if(random_seq):