MusicGenreClassification icon indicating copy to clipboard operation
MusicGenreClassification copied to clipboard

How to load model and make predictions on new data?

Open laag115 opened this issue 8 years ago • 3 comments

If I download a new song that is not in the Dataset, how could I see what genre it is using the Model.final output file?

laag115 avatar Aug 16 '17 19:08 laag115

??

pl425 avatar Feb 22 '18 16:02 pl425

Use preproccess.py to load a mp3 or .au etc.. to mfcc or mel-spec data, then start a tensorflow session, put some code like this: saver.restore(sess, "../output/model.final") xs, ys = /* your preproccessed data */ acc = sess.run(accuracy, feed_dict={x: xs, y: ys, keep_prob: 1.}) loss = sess.run(cost, feed_dict={x: xs, y: ys, keep_prob: 1.}) print("Minibatch Loss= " + \"{:.6f}".format(loss) + ", Accuracy= " + "{:.5f}".format(acc))

when accuracy is 1 then model prediction is right, otherwise accuracy is zero.

eggfly avatar Feb 28 '18 15:02 eggfly

I'm sorry to disturb you. Since the link of the data set of this project in the current year is invalid and the author cannot be contacted, I can only ask you in this way. If you still have the data set of this project, could you please send it to me [email protected]

jqzhao7 avatar Mar 02 '22 11:03 jqzhao7