Created
March 26, 2020 21:30
-
-
Save aravindpai/9f7fe5dad0d90eb1e8a5b8772815c6cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
ind = np.random.randint(0,len(x_val)-1) | |
random_music = x_val[ind] | |
predictions=[] | |
for i in range(10): | |
random_music = random_music.reshape(1,no_of_timesteps) | |
prob = model.predict(random_music)[0] | |
y_pred= np.argmax(prob,axis=0) | |
predictions.append(y_pred) | |
random_music = np.insert(random_music[0],len(random_music[0]),y_pred) | |
random_music = random_music[1:] | |
print(predictions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment