Skip to content

Instantly share code, notes, and snippets.

Created March 26, 2020 21:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save aravindpai/9f7fe5dad0d90eb1e8a5b8772815c6cf to your computer and use it in GitHub Desktop.
import random
ind = np.random.randint(0,len(x_val)-1)
random_music = x_val[ind]
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)
random_music = np.insert(random_music[0],len(random_music[0]),y_pred)
random_music = random_music[1:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment