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

I have a statement that doesn't quite understand #8

Open
Haorotu opened this issue Oct 9, 2018 · 13 comments
Open

I have a statement that doesn't quite understand #8

Haorotu opened this issue Oct 9, 2018 · 13 comments

Comments

@Haorotu
Copy link

Haorotu commented Oct 9, 2018

Hi Rayan:
Thanks,I'm sorry I ask for your help again.Thanks very much for your enjoying code that helps me a lot.When I read the code,I have a statement that doesnit quite understand in ‘find_best_model.py’.In the function of the create_model,"globalvars.globalVar += 1",this code I don't understand ,Please help explain this statement.Please help me,thanks very much!

@Haorotu
Copy link
Author

Haorotu commented Oct 11, 2018

I'm sorry.I couldn't describe my question clearly.I didn't understand why the globalvars could self sum until 6,why have six .h5.
Another to help me describe what's the meaning of "U_train","U_test" please.Thank you very much.Thanks.

@RayanWang
Copy link
Owner

For the first question, the globalVar will sum to 6 because of I set the parameter max_evals in optim.minimize() to 6. Please refer to Hyperas for more information.
U_train and U_test mean the initial attention parameters for training and testing respectively. Please refer to the papers I listed in the readme references.

@Haorotu
Copy link
Author

Haorotu commented Oct 16, 2018

Please help me in your spare time!Please .Thanks very much.

@Haorotu
Copy link
Author

Haorotu commented Oct 16, 2018

I‘m so sorry to disturb you again.I solve these problems by myself above my ask.I meet a question about code.Please help me.When I run the "prdeiction.py" in the spyder IDE.It occur to unroll this:
image
I didn't how to create the"prediction_features.p" this file.When I run the "python prediction.py -p "F:/blstm/Speech_emotion_recognition_BLSTM/testwav/201.wav" -m "F:/blstm/Speech_emotion_recognition_BLSTM/weights_blstm_hyperas_4.h5" -l -e -c 7"like this.It just unrolls:
image
So please help me how to create this "prediction_features.p" file.Please ,Thanks very much!Please!

@RayanWang
Copy link
Owner

Hello, it's my mistake in prediction.py, I have updated the source code, thank you.

@Haorotu
Copy link
Author

Haorotu commented Oct 17, 2018

Hello,thanks very much for your reply.I already run your fixed code in Spyder IDE in this "prediction.py",but I also find a problem after running this code.It unrolls:
image

Because it just only leads in one file.wav,I can't lead in folder's all file.wav .The folder is named "testwav".It's just due to this"rawread.py"
So I didn't know how to solove this problem.Please help me.Thanks very much.

@RayanWang
Copy link
Owner

RayanWang commented Oct 17, 2018

Use the following code, and that will achieve your desired effect if you enter a folder path as the data path:

 .....

 if os.path.isdir(data_path):
        audio_path = [os.path.join(data_path, i) for i in os.listdir(data_path)]
        audio_path = [i for i in audio_path if os.path.isfile(i) and '.wav' in i]
  .....
  for key, i in enumerate(audio_path):
       # your prediction code here

@Haorotu
Copy link
Author

Haorotu commented Oct 17, 2018

I’m sorry I feel a little confused about how to add your suggested code.I add this code that is also occur to the same error above my description.I want to confirm the code.Please help me.It unrolls:
image
image

@RayanWang
Copy link
Owner

RayanWang commented Oct 17, 2018

You still predict one wav at a time, but through this for loop, you can achieve the same effect with batch prediction.

.....

for key, i in enumerate(audio_path):
    y, sr = librosa.load(i, sr=16000)
    f = extract(y, sr)

@Haorotu
Copy link
Author

Haorotu commented Oct 17, 2018

Hello,thanks very much for your help.I got it in "prediction.py",that archieves batch prediction.Thanks again.
If possible,could I be your student.I have followed the example of you in the area of SER.Please allow me talk with you "my teacher".Thanks for your help...

@Haorotu
Copy link
Author

Haorotu commented Oct 17, 2018

Dear Rayan:
I didn't know the "prediction.py"return a list that include 7 elements what do this 7element mean? I want to realise the relationship between the class and 7 element value.
Thanks very much.

@Haorotu
Copy link
Author

Haorotu commented Oct 26, 2018

Hello Rayan
I‘m sorry to disturb you again.In this "dataset.py"file,I have a little confused sentences.Like in the fuction of "get_berlin_dataset":
image
What's the meaning of "classes[audio[5]]"and " if audio[:2] in speak_test:"?What's the meaning of "5""? Please help me explain them in your spare time.Thanks you very much.
Best wishes!

@Haorotu
Copy link
Author

Haorotu commented Oct 31, 2018

Dear Rayan:
I'm sorry to disturb you again.Please help to tell me what is "dafex_dataset"? Thanks very much.
Best wishes!

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

2 participants