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
What would you like to do?
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