multimodal-speech-emotion-recognition icon indicating copy to clipboard operation
multimodal-speech-emotion-recognition copied to clipboard

Questions about document handling.

Open chenyu-l opened this issue 2 years ago • 5 comments

I want to know what changes have been made to the two CSV files(audio_test.csv、audio_train.csv )(in data/s2e/) to generate modified_ df_ test. csv、modified_ df_ train. csv ? Because I met a mistake using 'torch.LongTensor(data[1])' directly for the original two CSV files when run lstm_classfier.py . And you didn't tell us how to generate the two new CSV file.

chenyu-l avatar Apr 14 '22 11:04 chenyu-l

The modified version oversamples data points for surprise and fear (as they are underrepresented). A 90/10 train/test split is then created.

Demfier avatar Apr 14 '22 12:04 Demfier

I was faced with the same problem as chenyu-I, and I did the split, and got modified_ df_ test. csv、modified_ df_ train. csv. but there's another problem: too many dimensions 'str' when running the lstm_classifier.

llitmus avatar May 30 '22 13:05 llitmus

@llitmus could you paste the full error log? It's difficult to for me to assist otherwise.

Demfier avatar May 30 '22 22:05 Demfier

This is my error when running the lstm_classifier. Something wrong in utils.py. Maybe I did the split false.

ValueError Traceback (most recent call last) ~/multimodal-speech-emotion-recognition-master/lstm_classifier/s2e/lstm_classifier.py in 49 optimizer = optim.Adam(model.parameters(), lr=config['learning_rate']) 50 ---> 51 train_batches = load_data() 52 test_pairs = load_data(test=True) 53

~/multimodal-speech-emotion-recognition-master/lstm_classifier/s2e/utils.py in load_data(batched, test, file_dir) 28 output_batch.append(e[1]) 29 batches.append([torch.FloatTensor(input_batch), ---> 30 torch.LongTensor(output_batch)]) 31 return batches 32

ValueError: too many dimensions 'str'

This is my split code. I add it in the 4th .ipynb
modified_df_train,modified_df_test = train_test_split(df, test_size=0.10)
modified_df_train.to_csv('../data/s2e/modified_df_train.csv', index=False)
modified_df_test.to_csv('../data/s2e/modified_df_test.csv', index=False)

print(modified_df_train.shape, modified_df_test.shape)

the output is alright . (1913, 10) (213, 10)

And I'm trying to use data/s2e/audio_train.csv in the lstm_classifier but failed either

Thank u so much!

llitmus avatar May 31 '22 01:05 llitmus

Oh! I just sovled the problem by droping the col 'wav_file' .hhh. But there's a loss of predit_proba.py .hhh in s2e. I copied the combined predit py ^-^ Anyway,thanks a lot!

llitmus avatar May 31 '22 08:05 llitmus