SYMBOL INDEX (86 symbols across 11 files) FILE: config.py function str2bool (line 3) | def str2bool(v): function get_config (line 13) | def get_config(case): FILE: data.py function normalize_1d (line 18) | def normalize_1d(input_tensor): function get_input_sample (line 25) | def get_input_sample(sent_obj, tokenizer, eeg_type = 'GD', bands = ['_t1... class ZuCo_dataset (line 160) | class ZuCo_dataset(Dataset): method __init__ (line 161) | def __init__(self, input_dataset_dicts, phase, tokenizer, subject = 'A... method __len__ (line 237) | def __len__(self): method __getitem__ (line 240) | def __getitem__(self, idx): class SST_tenary_dataset (line 256) | class SST_tenary_dataset(Dataset): method __init__ (line 257) | def __init__(self, ternary_labels_dict, tokenizer, max_len = 56, balan... method __len__ (line 286) | def __len__(self): method __getitem__ (line 289) | def __getitem__(self, idx): FILE: eval_decoding.py function remove_text_after_token (line 30) | def remove_text_after_token(text, token=''): function eval_model (line 37) | def eval_model(dataloaders, device, tokenizer, criterion, model, output_... FILE: eval_sentiment.py function flat_accuracy (line 26) | def flat_accuracy(preds, labels): function flat_accuracy_top_k (line 35) | def flat_accuracy_top_k(preds, labels,k): function eval_model (line 50) | def eval_model(dataloaders, device, model, criterion, optimizer, schedul... FILE: model_decoding.py class BrainTranslator (line 9) | class BrainTranslator(nn.Module): method __init__ (line 10) | def __init__(self, pretrained_layers, in_feature = 840, decoder_embedd... method addin_forward (line 23) | def addin_forward(self,input_embeddings_batch, input_masks_invert): method generate (line 37) | def generate( method forward (line 70) | def forward(self, input_embeddings_batch, input_masks_batch, input_mas... class T5Translator (line 81) | class T5Translator(nn.Module): method __init__ (line 82) | def __init__(self, pretrained_layers, in_feature = 840, decoder_embedd... method addin_forward (line 98) | def addin_forward(self,input_embeddings_batch, input_masks_invert): method generate (line 112) | def generate( method forward (line 154) | def forward(self, input_embeddings_batch, input_masks_batch, input_mas... class BrainTranslatorNaive (line 170) | class BrainTranslatorNaive(nn.Module): method __init__ (line 171) | def __init__(self, pretrained_layers, in_feature = 840, decoder_embedd... method forward (line 177) | def forward(self, input_embeddings_batch, input_masks_batch, input_mas... class Pooler (line 188) | class Pooler(nn.Module): method __init__ (line 189) | def __init__(self, hidden_size): method forward (line 194) | def forward(self, hidden_states): class PositionalEncoding (line 203) | class PositionalEncoding(nn.Module): method __init__ (line 205) | def __init__(self, d_model, dropout=0.1, max_len=5000): method forward (line 217) | def forward(self, x): class BrainTranslatorBert (line 226) | class BrainTranslatorBert(nn.Module): method __init__ (line 227) | def __init__(self, pretrained_layers, in_feature = 840, hidden_size = ... method forward (line 233) | def forward(self, input_embeddings_batch, input_masks_batch, target_id... class EEG2BertMapping (line 238) | class EEG2BertMapping(nn.Module): method __init__ (line 239) | def __init__(self, in_feature = 840, hidden_size = 512, out_feature = ... method forward (line 244) | def forward(self, x): class ContrastiveBrainTextEncoder (line 249) | class ContrastiveBrainTextEncoder(nn.Module): method __init__ (line 250) | def __init__(self, pretrained_text_encoder, in_feature = 840, eeg_enco... method forward (line 268) | def forward(self, input_EEG_features, input_EEG_attn_mask, input_ids, ... FILE: model_sentiment.py class BaselineMLPSentence (line 11) | class BaselineMLPSentence(nn.Module): method __init__ (line 12) | def __init__(self, input_dim = 840, hidden_dim = 128, output_dim = 3): method forward (line 21) | def forward(self, x): class BaselineLSTM (line 32) | class BaselineLSTM(nn.Module): method __init__ (line 33) | def __init__(self, input_dim = 840, hidden_dim = 256, output_dim = 3, ... method forward (line 42) | def forward(self, x_packed): class NaiveFineTunePretrainedBert (line 52) | class NaiveFineTunePretrainedBert(nn.Module): method __init__ (line 53) | def __init__(self, input_dim = 840, hidden_dim = 768, output_dim = 3, ... method forward (line 62) | def forward(self, input_embeddings_batch, input_masks_batch, labels): class FineTunePretrainedTwoStep (line 68) | class FineTunePretrainedTwoStep(nn.Module): method __init__ (line 69) | def __init__(self, pretrained_layers, in_feature = 840, d_model = 1024... method forward (line 83) | def forward(self, input_embeddings_batch, input_masks_batch, input_mas... class ZeroShotSentimentDiscovery (line 102) | class ZeroShotSentimentDiscovery(nn.Module): method __init__ (line 103) | def __init__(self, brain2text_translator, sentiment_classifier, transl... method forward (line 114) | def forward(self, input_embeddings_batch, input_masks_batch, input_mas... class BartClassificationHead (line 147) | class BartClassificationHead(nn.Module): method __init__ (line 150) | def __init__( method forward (line 162) | def forward(self, hidden_states: torch.Tensor): class JointBrainTranslatorSentimentClassifier (line 170) | class JointBrainTranslatorSentimentClassifier(nn.Module): method __init__ (line 171) | def __init__(self, pretrained_layers, in_feature = 840, d_model = 1024... method forward (line 184) | def forward(self, input_embeddings_batch, input_masks_batch, input_mas... class Pooler (line 214) | class Pooler(nn.Module): method __init__ (line 215) | def __init__(self, hidden_size): method forward (line 220) | def forward(self, hidden_states): class PositionalEncoding (line 229) | class PositionalEncoding(nn.Module): method __init__ (line 231) | def __init__(self, d_model, dropout=0.1, max_len=5000): method forward (line 243) | def forward(self, x): FILE: train_decoding.py function train_model (line 20) | def train_model(dataloaders, device, model, criterion, optimizer, schedu... function show_require_grad_layers (line 126) | def show_require_grad_layers(model): FILE: train_sentiment_baseline.py function flat_accuracy (line 22) | def flat_accuracy(preds, labels): function flat_accuracy_top_k (line 31) | def flat_accuracy_top_k(preds, labels,k): function train_model (line 46) | def train_model(dataloaders, device, model, criterion, optimizer, schedu... FILE: train_sentiment_textbased.py function flat_accuracy (line 21) | def flat_accuracy(preds, labels): function flat_accuracy_top_k (line 30) | def flat_accuracy_top_k(preds, labels,k): function train_model_ZuCo (line 45) | def train_model_ZuCo(dataloaders, device, model, criterion, optimizer, s... function train_model_SST (line 137) | def train_model_SST(dataloaders, device, model, criterion, optimizer, sc... FILE: util/data_loading_helpers_modified.py function extract_all_fixations (line 37) | def extract_all_fixations(data_container, word_data_object, float_resolu... function is_real_word (line 54) | def is_real_word(word): function load_matlab_string (line 65) | def load_matlab_string(matlab_extracted_object): function extract_word_level_data (line 76) | def extract_word_level_data(data_container, word_objects, eeg_float_reso... FILE: util/get_SST_ternary_dataset.py function get_SST_dataset (line 15) | def get_SST_dataset(SST_dir_path, ZuCo_used_sentences, ZUCO_SENTIMENT_LA...