MusicGenreClassification icon indicating copy to clipboard operation
MusicGenreClassification copied to clipboard

While Running formatInput.py and train.py I am getting these error

Open DAKSHSEMWAL opened this issue 7 years ago • 2 comments

after running train.py screenshot 8 after running formatInput.py screenshot 9

DAKSHSEMWAL avatar Mar 10 '18 08:03 DAKSHSEMWAL

@DAKSHSEMWAL

In formatInput.py , you have to write the file with write-byte flag like the code below

     with open("data", 'wb') as f:
        f.write(pickle.dumps(data.values()))

In train.py , you have to open the file with read-byte flag like the code below.

Do not forget to load the pickle with encoding of latin1 , otherwise you will get the error complaining that the character can't be represented in ASCII

    with open("labels", 'rb') as f:
        content = f.read()
        labels = pickle.loads(content,encoding='latin1')

SunMaungOo avatar Jul 12 '18 19:07 SunMaungOo

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