Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to load model and make predictions on new data? #2

Open
laag115 opened this issue Aug 16, 2017 · 3 comments
Open

How to load model and make predictions on new data? #2

laag115 opened this issue Aug 16, 2017 · 3 comments

Comments

@laag115
Copy link

laag115 commented Aug 16, 2017

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 laag115 changed the title Can you classify an arbitrary song with Model.final? How to load model and make predictions on new data? Aug 16, 2017
@pl425
Copy link

pl425 commented Feb 22, 2018

??

@eggfly
Copy link

eggfly commented Feb 28, 2018

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.

@jqzhao7
Copy link

jqzhao7 commented Mar 2, 2022

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 zjq2048@qq.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants