SYMBOL INDEX (66 symbols across 8 files) FILE: examples/NLG/eval/eval.py function parse (line 63) | def parse(refs_path, hyps_path, num_refs, lng='en'): function bleu_score (line 102) | def bleu_score(refs_path, hyps_path, num_refs): function bleu_nltk (line 125) | def bleu_nltk(references, hypothesis): function meteor_score (line 138) | def meteor_score(references, hypothesis, num_refs, lng='en'): function chrF_score (line 174) | def chrF_score(references, hypothesis, num_refs, nworder, ncorder, beta): function ter_score (line 216) | def ter_score(references, hypothesis, num_refs): function bert_score_ (line 239) | def bert_score_(references, hypothesis, lng='en'): function bleurt (line 257) | def bleurt(references, hypothesis, num_refs, checkpoint = "metrics/bleur... function run (line 270) | def run(refs_path, hyps_path, num_refs, lng='en', metrics='bleu,meteor,c... FILE: examples/NLG/src/encoder.py function bytes_to_unicode (line 12) | def bytes_to_unicode(): function get_pairs (line 34) | def get_pairs(word): class Encoder (line 46) | class Encoder: method __init__ (line 48) | def __init__(self, encoder, bpe_merges, errors='replace'): method bpe (line 66) | def bpe(self, token): method encode (line 107) | def encode(self, text): method decode (line 117) | def decode(self, tokens): function get_encoder (line 123) | def get_encoder(models_dir): FILE: examples/NLG/src/exp_utils.py function logging (line 12) | def logging(s, log_path, print_=True, log_=True): function get_logger (line 20) | def get_logger(log_path, **kwargs): function create_exp_dir (line 24) | def create_exp_dir(dir_path, scripts_to_save=None, debug=False): function save_checkpoint (line 44) | def save_checkpoint(model, optimizer, path, epoch): FILE: examples/NLG/src/gpt2_beam.py function print_args (line 84) | def print_args(args): function _reorder_cache (line 92) | def _reorder_cache(past: Tuple, beam_idx: Tensor) -> Tuple[Tensor]: function _calc_banned_ngram_tokens (line 96) | def _calc_banned_ngram_tokens( function _enforce_repetition_penalty_ (line 125) | def _enforce_repetition_penalty_( function _postprocess_next_token_scores (line 145) | def _postprocess_next_token_scores( function _add_beam_candidate (line 182) | def _add_beam_candidate( function beam (line 206) | def beam(model, data_iter, args): FILE: examples/NLG/src/gpt2_decode.py function stardard_tokenize (line 49) | def stardard_tokenize(sent): function post_process (line 56) | def post_process(sent, is_tokenize, is_lower): FILE: examples/NLG/src/gpt2_ft.py function print_args (line 94) | def print_args(args): class AverageMeter (line 102) | class AverageMeter(object): method __init__ (line 106) | def __init__(self): method reset (line 109) | def reset(self): method update (line 115) | def update(self, val, n=1): function optimizer_step (line 122) | def optimizer_step(_loss, _optimizer, _model, _schedule, args, is_update... function evaluate (line 143) | def evaluate(model, valid_loader, args): function train_validate (line 171) | def train_validate( FILE: examples/NLG/src/gpu.py function add_gpu_params (line 19) | def add_gpu_params(parser: argparse.ArgumentParser): function distributed_opt (line 28) | def distributed_opt(args, model, opt, grad_acc=1): function distributed_gather (line 42) | def distributed_gather(args, tensor): function distributed_sync (line 48) | def distributed_sync(args): function parse_gpu (line 55) | def parse_gpu(args): function cleanup (line 124) | def cleanup(args): FILE: examples/NLG/src/optimizer.py function add_optimizer_params (line 19) | def add_optimizer_params(parser: argparse.ArgumentParser): class AdamW (line 42) | class AdamW(Optimizer): method __init__ (line 51) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.98), eps=1e-6, weigh... method reset_state (line 64) | def reset_state(self): method step (line 72) | def step(self, closure=None): class CosineAnnealingWarmupRestarts (line 133) | class CosineAnnealingWarmupRestarts(_LRScheduler): method __init__ (line 144) | def __init__( method init_lr (line 163) | def init_lr(self): method get_lr (line 167) | def get_lr(self): method step (line 177) | def step(self, epoch=None): class CyclicScheduler (line 187) | class CyclicScheduler(_LRScheduler): method __init__ (line 188) | def __init__( method init_lr (line 206) | def init_lr(self): method get_lr (line 210) | def get_lr(self): method step (line 222) | def step(self, epoch=None): function get_linear_schedule_with_warmup (line 234) | def get_linear_schedule_with_warmup( function get_constant_schedule_with_warmup (line 250) | def get_constant_schedule_with_warmup( function create_grouped_parameters (line 266) | def create_grouped_parameters(model, no_decay_bias): # args): function create_adam_optimizer (line 286) | def create_adam_optimizer( function create_sgd_optimizer (line 311) | def create_sgd_optimizer(model, lr): function create_adam_optimizer_from_args (line 316) | def create_adam_optimizer_from_args(model, args, grouped_parameters=None): function create_optimizer_scheduler (line 331) | def create_optimizer_scheduler(optimizer, args):