MCPcopy Create free account

hub / github.com/NeuSpeech/EEG-To-Text / functions

Functions74 in github.com/NeuSpeech/EEG-To-Text

↓ 8 callersMethod__init__
(self, hidden_size)
model_sentiment.py:215
↓ 7 callersMethod__init__
(self, hidden_size)
model_decoding.py:189
↓ 6 callersFunctionget_input_sample
(sent_obj, tokenizer, eeg_type = 'GD', bands = ['_t1','_t2','_a1','_a2','_b1','_b2','_g1','_g2'], max_len = 56
data.py:25
↓ 5 callersFunctionget_config
(case)
config.py:13
↓ 3 callersFunctionload_matlab_string
Converts a string loaded from h5py into a python string :param matlab_extracted_object: (h5py) matlab string object :return:
util/data_loading_helpers_modified.py:65
↓ 2 callersMethodaddin_forward
input_embeddings_batch: batch_size*Seq_len*840
model_decoding.py:23
↓ 2 callersMethodaddin_forward
input_embeddings_batch: batch_size*Seq_len*840
model_decoding.py:98
↓ 2 callersFunctionextract_all_fixations
Extracts all fixations from a word data object :param data_container: (h5py) Container of the whole data, h5py object :param word_d
util/data_loading_helpers_modified.py:37
↓ 2 callersFunctionflat_accuracy
(preds, labels)
train_sentiment_textbased.py:21
↓ 2 callersMethodgenerate
( self, input_embeddings_batch, input_masks_batch, input_masks_invert, target_ids_batc
model_decoding.py:112
↓ 2 callersFunctionis_real_word
Check if the word is a real word :param word: (str) word string :return: is_word (bool) True if it is a real word
util/data_loading_helpers_modified.py:54
↓ 2 callersFunctionlogits2PredString
(logits, tokenizer)
eval_sentiment.py:52
↓ 2 callersFunctionnormalize_1d
(input_tensor)
data.py:18
↓ 2 callersFunctionshow_require_grad_layers
(model)
train_decoding.py:126
↓ 2 callersFunctiontrain_model
(dataloaders, device, model, criterion, optimizer, scheduler, num_epochs=25, checkpoint_path_best = './checkpo
train_decoding.py:20
↓ 1 callersFunctioneval_model
(dataloaders, device, model, criterion, optimizer, scheduler, num_epochs=25, tokenizer = BartTokenizer.from_pr
eval_sentiment.py:50
↓ 1 callersFunctioneval_model
(dataloaders, device, tokenizer, criterion, model, output_all_results_path = './results/temp.txt' , score_resu
eval_decoding.py:37
↓ 1 callersFunctionflat_accuracy
(preds, labels)
eval_sentiment.py:26
↓ 1 callersFunctionflat_accuracy
(preds, labels)
train_sentiment_baseline.py:22
↓ 1 callersFunctionget_SST_dataset
(SST_dir_path, ZuCo_used_sentences, ZUCO_SENTIMENT_LABELS)
util/get_SST_ternary_dataset.py:15
↓ 1 callersFunctionget_phrasestr_phrase_dict
return {phrase_str: phrase_id}
util/get_SST_ternary_dataset.py:33
↓ 1 callersFunctionget_sent_eeg
(sent_obj, bands)
data.py:42
↓ 1 callersFunctionget_sentence_label_dict
return {sentence_str:label(0-1)}
util/get_SST_ternary_dataset.py:46
↓ 1 callersFunctionget_sentiment_label_dict
return {phrase_id:sentiment_score(0-1)}
util/get_SST_ternary_dataset.py:17
↓ 1 callersFunctionget_word_embedding_eeg_tensor
(word_obj, eeg_type, bands)
data.py:27
↓ 1 callersFunctionremove_text_after_token
(text, token='</s>')
eval_decoding.py:30
↓ 1 callersFunctiontrain_model
(dataloaders, device, model, criterion, optimizer, scheduler, num_epochs=25, checkpoint_path_best = './checkpo
train_sentiment_baseline.py:46
↓ 1 callersFunctiontrain_model_SST
(dataloaders, device, model, criterion, optimizer, scheduler, num_epochs=25, checkpoint_path_best = './checkpo
train_sentiment_textbased.py:137
↓ 1 callersFunctiontrain_model_ZuCo
(dataloaders, device, model, criterion, optimizer, scheduler, num_epochs=25, checkpoint_path_best = './checkpo
train_sentiment_textbased.py:45
Method__getitem__
(self, idx)
data.py:240
Method__getitem__
(self, idx)
data.py:289
Method__init__
(self, pretrained_layers, in_feature = 840, decoder_embedding_size = 1024, additional_encoder_nhead=8, additio
model_decoding.py:10
Method__init__
(self, pretrained_layers, in_feature = 840, decoder_embedding_size = 1024, additional_encoder_nhead=8, additio
model_decoding.py:82
Method__init__
(self, pretrained_layers, in_feature = 840, decoder_embedding_size = 1024, additional_encoder_nhead=8, additio
model_decoding.py:171
Method__init__
(self, d_model, dropout=0.1, max_len=5000)
model_decoding.py:205
Method__init__
(self, pretrained_layers, in_feature = 840, hidden_size = 768)
model_decoding.py:227
Method__init__
(self, in_feature = 840, hidden_size = 512, out_feature = 768)
model_decoding.py:239
Method__init__
(self, pretrained_text_encoder, in_feature = 840, eeg_encoder_nhead=8, eeg_encoder_dim_feedforward = 2048, emb
model_decoding.py:250
Method__init__
(self, input_dim = 840, hidden_dim = 128, output_dim = 3)
model_sentiment.py:12
Method__init__
(self, input_dim = 840, hidden_dim = 256, output_dim = 3, num_layers = 1)
model_sentiment.py:33
Method__init__
(self, input_dim = 840, hidden_dim = 768, output_dim = 3, pretrained_checkpoint = None)
model_sentiment.py:53
Method__init__
(self, pretrained_layers, in_feature = 840, d_model = 1024, additional_encoder_nhead=8, additional_encoder_dim
model_sentiment.py:69
Method__init__
(self, brain2text_translator, sentiment_classifier, translation_tokenizer, sentiment_tokenizer, device = 'cpu'
model_sentiment.py:103
Method__init__
( self, input_dim: int, inner_dim: int, num_classes: int, pooler_dropo
model_sentiment.py:150
Method__init__
(self, pretrained_layers, in_feature = 840, d_model = 1024, additional_encoder_nhead=8, additional_encoder_dim
model_sentiment.py:171
Method__init__
(self, d_model, dropout=0.1, max_len=5000)
model_sentiment.py:231
Method__init__
(self, input_dataset_dicts, phase, tokenizer, subject = 'ALL', eeg_type = 'GD', bands = ['_t1','_t2','_a1','_a
data.py:161
Method__init__
(self, ternary_labels_dict, tokenizer, max_len = 56, balance_class = True)
data.py:257
Method__len__
(self)
data.py:237
Method__len__
(self)
data.py:286
Functionextract_word_level_data
Extracts word level data for a specific sentence :param data_container: (h5py) Container of the whole data, h5py object :param
util/data_loading_helpers_modified.py:76
Functionflat_accuracy_top_k
(preds, labels,k)
eval_sentiment.py:35
Functionflat_accuracy_top_k
(preds, labels,k)
train_sentiment_textbased.py:30
Functionflat_accuracy_top_k
(preds, labels,k)
train_sentiment_baseline.py:31
Methodforward
(self, input_embeddings_batch, input_masks_batch, input_masks_invert, target_ids_batch_converted)
model_decoding.py:70
Methodforward
(self, input_embeddings_batch, input_masks_batch, input_masks_invert, target_ids_batch_converted)
model_decoding.py:154
Methodforward
input_embeddings_batch: batch_size*Seq_len*840
model_decoding.py:177
Methodforward
(self, hidden_states)
model_decoding.py:194
Methodforward
(self, x)
model_decoding.py:217
Methodforward
(self, input_embeddings_batch, input_masks_batch, target_ids_batch)
model_decoding.py:233
Methodforward
(self, x)
model_decoding.py:244
Methodforward
(self, input_EEG_features, input_EEG_attn_mask, input_ids, input_text_attention_masks)
model_decoding.py:268
Methodforward
(self, x)
model_sentiment.py:21
Methodforward
(self, x_packed)
model_sentiment.py:42
Methodforward
(self, input_embeddings_batch, input_masks_batch, labels)
model_sentiment.py:62
Methodforward
input_embeddings_batch: batch_size*Seq_len*840
model_sentiment.py:83
Methodforward
input_embeddings_batch: batch_size*Seq_len*840
model_sentiment.py:114
Methodforward
(self, hidden_states: torch.Tensor)
model_sentiment.py:162
Methodforward
input_embeddings_batch: batch_size*Seq_len*840
model_sentiment.py:184
Methodforward
(self, hidden_states)
model_sentiment.py:220
Methodforward
(self, x)
model_sentiment.py:243
Methodgenerate
( self, input_embeddings_batch, input_masks_batch, input_masks_invert, target_ids_batc
model_decoding.py:37
Methodlogits2PredString
(logits)
model_sentiment.py:120
Functionstr2bool
(v)
config.py:3