Closed Dark-knight-02 closed 6 days ago
You need to check your data pikcle file. data is still not loaded
I tried the code and tested it. I found that this was part of the code causing the error.
There was an issue with the line sent_level_eeg_tensor = torch.from_numpy(sent_obj['sentence_level_rawEEG']) The sent_obj['sentence_level_rawEEG'] gives out a dictionary
Also the data prepared using the construct_dataset_mat_to_pickle_v1.py makes the pickle file with sent_obj['sentence_level_EEG'] which was sent_obj['sentence_level_rawEEG'] in the code of data.py (last commit)
Same with the sent_obj['word_ft'] and sent_obj['word'] keyword variation which caused an error.
Thank you for notice to me. I changed the word_ft => word.
There needs to be a couple of changes to the code to get it running. I have made a pull request incorporating all the necessary changes. Kindly review it.
The issue closed with the recent merge.
thank you
train_input is: EEG [INFO]using model: BrainTranslator ![Debug]using ALL [INFO]eeg type GD [INFO]using bands ['_t1', '_t2', '_a1', '_a2', '_b1', '_b2', '_g1', '_g2'] [INFO]using device cuda:0
[INFO]loading 3 task datasets [INFO]using subjects: ['ZAB', 'ZDM', 'ZDN', 'ZGW', 'ZJM', 'ZJN', 'ZJS', 'ZKB', 'ZKH', 'ZKW', 'ZMG', 'ZPH'] train divider = 320 dev divider = 360 [INFO]initializing a train set... ++ adding task to dataset, now we have: 0 [INFO]using subjects: ['ZAB', 'ZDM', 'ZDN', 'ZGW', 'ZJM', 'ZJN', 'ZJS', 'ZKB', 'ZKH', 'ZKW', 'ZMG', 'ZPH'] train divider = 240 dev divider = 270 [INFO]initializing a train set... ++ adding task to dataset, now we have: 0 [INFO]using subjects: ['ZAB', 'ZDM', 'ZDN', 'ZGW', 'ZJM', 'ZJN', 'ZJS', 'ZKB', 'ZKH', 'ZKW', 'ZMG', 'ZPH'] train divider = 325 dev divider = 365 [INFO]initializing a train set... ++ adding task to dataset, now we have: 0 Traceback (most recent call last): File "/content/drive/MyDrive/mitacs/EEG-To-Text/train_decoding.py", line 265, in
train_set = ZuCo_dataset(whole_dataset_dicts, 'train', tokenizer, subject = subject_choice, eeg_type = eeg_type_choice, bands = bands_choice, setting = dataset_setting, test_input=train_input)
File "/content/drive/MyDrive/mitacs/EEG-To-Text/data.py", line 234, in init
print('[INFO]input tensor size:', self.inputs[0]['input_embeddings'].size())
IndexError: list index out of range