SYMBOL INDEX (148 symbols across 17 files) FILE: create_swag/generate_candidates/classifiers.py function reshape (line 23) | def reshape(f): class LMFeatsModel (line 37) | class LMFeatsModel(nn.Module): method __init__ (line 38) | def __init__(self, input_dim=5, hidden_dim=1024): method forward (line 57) | def forward(self, feats): method fit (line 66) | def fit(self, data, val_data=None, num_epoch=10): method validate (line 95) | def validate(self, data): class BoWModel (line 106) | class BoWModel(nn.Module): method __init__ (line 107) | def __init__(self, vocab, use_mean=True, embed_dim=100): method forward (line 129) | def forward(self, word_ids): class CNNModel (line 144) | class CNNModel(nn.Module): method __init__ (line 145) | def __init__(self, vocab, embed_dim=100, window_sizes=(2, 3, 4, 5), nu... method forward (line 166) | def forward(self, word_ids, indicator_ids): class BLSTMModel (line 185) | class BLSTMModel(nn.Module): method __init__ (line 186) | def __init__(self, vocab, use_postags_only=True, embed_dim=100, hidden... method forward (line 215) | def forward(self, word_ids, indicator_ids): class Ensemble (line 236) | class Ensemble(nn.Module): method __init__ (line 237) | def __init__(self, vocab): method forward (line 256) | def forward(self, lm_feats, ending_word_ids, postags_word_ids, ctx_ind... method predict (line 275) | def predict(self, lm_feats, ending_word_ids, postags_word_ids, ctx_ind... method validate (line 283) | def validate(self, val_dataloader): method fit (line 305) | def fit(self, train_dataloader, val_dataloader, num_epoch=5): FILE: create_swag/generate_candidates/questions2mturk.py function _detokenize (line 12) | def _detokenize(sent): FILE: create_swag/generate_candidates/rebalance_dataset_ensemble.py class AssignmentsDataLoader (line 63) | class AssignmentsDataLoader(Dataset): method __init__ (line 65) | def __init__(self, instances, inds, train=True, recompute_assignments=... method collate (line 75) | def collate(self, items_l): method __len__ (line 112) | def __len__(self): method __getitem__ (line 115) | def __getitem__(self, index): method splits (line 149) | def splits(cls, assignments): function _iter (line 199) | def _iter(): FILE: create_swag/generate_candidates/rebalance_dataset_mlp.py class SimpleCudaLoader (line 58) | class SimpleCudaLoader(object): method __init__ (line 60) | def __init__(self, method __iter__ (line 76) | def __iter__(self): method randomsplits (line 101) | def randomsplits(cls): method __len__ (line 111) | def __len__(self): class MLPModel (line 118) | class MLPModel(nn.Module): method __init__ (line 119) | def __init__(self): method forward (line 133) | def forward(self, feats): method fit (line 138) | def fit(self, data, val_data=None, n_epoch=10): method predict (line 168) | def predict(self, data): FILE: create_swag/generate_candidates/sample_candidates.py function find_VP (line 63) | def find_VP(tree): function split_on_final_vp (line 103) | def split_on_final_vp(sentence): FILE: create_swag/lm/load_data.py function load_lm_data (line 24) | def load_lm_data(fold=None, mode='train'): class RawPassages (line 103) | class RawPassages(Dataset): method __init__ (line 104) | def __init__(self, fold, mode): method collate (line 113) | def collate(self, instances_l): method __len__ (line 124) | def __len__(self): method __getitem__ (line 127) | def __getitem__(self, index): method splits (line 138) | def splits(cls, fold): FILE: create_swag/lm/pretrain_lm.py function batcher (line 24) | def batcher(inp_list): function data_runner (line 36) | def data_runner(start_point=0, minlength=4): function _sample_a_good_pair (line 45) | def _sample_a_good_pair(gen, seq_length, min_length=3): function looped_data_runner (line 59) | def looped_data_runner(batch_size=128, seq_length=50): function bucketed_data_runner (line 69) | def bucketed_data_runner(batch_size=64, seq_length=50): FILE: create_swag/lm/simple_bilm.py function _de_duplicate_generations (line 23) | def _de_duplicate_generations(generations): class StackedLstm (line 40) | class StackedLstm(torch.nn.Module): method __init__ (line 70) | def __init__(self, method forward (line 97) | def forward(self, # pylint: disable=arguments-differ class SimpleBiLM (line 138) | class SimpleBiLM(torch.nn.Module): method __init__ (line 139) | def __init__(self, method embed_words (line 174) | def embed_words(self, words): method timestep_to_ids (line 189) | def timestep_to_ids(self, timestep_tokenized: List[str]): method batch_to_ids (line 194) | def batch_to_ids(self, stories_tokenized: List[List[str]]): method conditional_generation (line 210) | def conditional_generation(self, context, gt_completion, batch_size=12... method _chunked_logsoftmaxes (line 277) | def _chunked_logsoftmaxes(self, activation, word_targets, chunk_size=2... method forward (line 299) | def forward(self, words: torch.Tensor, use_forward=True, use_reverse=T... FILE: pytorch_misc.py function optimistic_restore (line 15) | def optimistic_restore(network, state_dict): function pairwise (line 37) | def pairwise(iterable): function get_ranking (line 44) | def get_ranking(predictions, labels, num_guesses=5): function cache (line 65) | def cache(f): class Flattener (line 84) | class Flattener(nn.Module): method __init__ (line 85) | def __init__(self): method forward (line 91) | def forward(self, x): function to_variable (line 95) | def to_variable(f): function arange (line 111) | def arange(base_tensor, n=None): function to_onehot (line 118) | def to_onehot(vec, num_classes, on_fill=1, off_fill=0): function save_net (line 139) | def save_net(fname, net): function load_net (line 145) | def load_net(fname, net): function batch_index_iterator (line 156) | def batch_index_iterator(len_l, batch_size, skip_end=True): function batch_map (line 174) | def batch_map(f, a, batch_size): function const_row (line 191) | def const_row(fill, l, volatile=False): function print_para (line 198) | def print_para(model): function accuracy (line 219) | def accuracy(output, target, topk=(1,)): function nonintersecting_2d_inds (line 235) | def nonintersecting_2d_inds(x): function intersect_2d (line 246) | def intersect_2d(x1, x2): function np_to_variable (line 263) | def np_to_variable(x, is_cuda=True, dtype=torch.FloatTensor): function gather_nd (line 270) | def gather_nd(x, index): function enumerate_by_image (line 293) | def enumerate_by_image(im_inds): function diagonal_inds (line 317) | def diagonal_inds(tensor): function enumerate_imsize (line 331) | def enumerate_imsize(im_sizes): function argsort_desc (line 341) | def argsort_desc(scores): function unravel_index (line 351) | def unravel_index(index, dims): function de_chunkize (line 360) | def de_chunkize(tensor, chunks): function random_choose (line 367) | def random_choose(tensor, num): function transpose_packed_sequence_inds (line 385) | def transpose_packed_sequence_inds(lengths): function right_shift_packed_sequence_inds (line 407) | def right_shift_packed_sequence_inds(lengths): function clip_grad_norm (line 437) | def clip_grad_norm(named_parameters, max_norm, clip=False, verbose=False): function time_batch (line 478) | def time_batch(gen, reset_every=100): function update_lr (line 494) | def update_lr(optimizer, lr=1e-4): function all_upper_triangular_pairs (line 499) | def all_upper_triangular_pairs(gen): function pad_last_dim (line 507) | def pad_last_dim(tensor, new_size): FILE: raw_data/events.py function remove_allcaps (line 25) | def remove_allcaps(sent): function load_rocstories (line 47) | def load_rocstories(split): function _to_time (line 112) | def _to_time(pandas_col): function _lsmdc_to_list (line 117) | def _lsmdc_to_list(lsmdc, lsmdc_window=20): function load_mpii (line 144) | def load_mpii(split): function load_mpii_depersonized (line 180) | def load_mpii_depersonized(split): function load_visual_madlibs (line 249) | def load_visual_madlibs(split): function load_vist (line 343) | def load_vist(split): function load_lsmdc (line 359) | def load_lsmdc(split): function load_didemo (line 421) | def load_didemo(split): function load_anet (line 445) | def load_anet(split): function load_ava (line 456) | def load_ava(split): function n2w_1k (line 473) | def n2w_1k(x, use_ordinal=False): function _postprocess (line 478) | def _postprocess(sentence): function load_everything (line 507) | def load_everything(): FILE: swag_baselines/decomposable_attention/dataset_reader.py class SwagReader (line 25) | class SwagReader(DatasetReader): method __init__ (line 40) | def __init__(self, method _read (line 50) | def _read(self, file_path: str): method text_to_instance (line 70) | def text_to_instance(self, # type: ignore method from_params (line 89) | def from_params(cls, params: Params) -> 'SwagReader': FILE: swag_baselines/decomposable_attention/decomposable_attention_swag.py class DecomposableAttention (line 22) | class DecomposableAttention(Model): method __init__ (line 68) | def __init__(self, vocab: Vocabulary, method forward (line 122) | def forward(self, # type: ignore method get_metrics (line 223) | def get_metrics(self, reset: bool = False) -> Dict[str, float]: method from_params (line 229) | def from_params(cls, vocab: Vocabulary, params: Params) -> 'Decomposab... FILE: swag_baselines/esim/dataset_reader.py class SwagReader (line 25) | class SwagReader(DatasetReader): method __init__ (line 40) | def __init__(self, method _read (line 50) | def _read(self, file_path: str): method text_to_instance (line 70) | def text_to_instance(self, # type: ignore method from_params (line 89) | def from_params(cls, params: Params) -> 'SwagReader': FILE: swag_baselines/esim/esim_swag.py class VariationalDropout (line 27) | class VariationalDropout(torch.nn.Dropout): method forward (line 28) | def forward(self, input): class ESIM (line 44) | class ESIM(Model): method __init__ (line 81) | def __init__(self, vocab: Vocabulary, method forward (line 126) | def forward(self, # type: ignore method get_metrics (line 264) | def get_metrics(self, reset: bool = False) -> Dict[str, float]: method from_params (line 270) | def from_params(cls, vocab: Vocabulary, params: Params) -> 'ESIM': FILE: swag_baselines/fasttext/prep_data.py function _tokenize (line 9) | def _tokenize(sent): FILE: swag_baselines/unarylstm/dataset_reader.py class SwagReader (line 24) | class SwagReader(DatasetReader): method __init__ (line 39) | def __init__(self, method _read (line 51) | def _read(self, file_path: str): method text_to_instance (line 71) | def text_to_instance(self, # type: ignore method from_params (line 90) | def from_params(cls, params: Params) -> 'SwagReader': FILE: swag_baselines/unarylstm/lstm_swag.py class LstmSwag (line 21) | class LstmSwag(Model): method __init__ (line 51) | def __init__(self, vocab: Vocabulary, method forward (line 76) | def forward(self, # type: ignore method get_metrics (line 125) | def get_metrics(self, reset: bool = False) -> Dict[str, float]: method from_params (line 131) | def from_params(cls, vocab: Vocabulary, params: Params) -> 'LstmSwag':