SYMBOL INDEX (438 symbols across 25 files) FILE: models/ERNIE.py class Config (line 7) | class Config(object): method __init__ (line 10) | def __init__(self, dataset): class Model (line 32) | class Model(nn.Module): method __init__ (line 34) | def __init__(self, config): method forward (line 41) | def forward(self, x): FILE: models/bert.py class Config (line 8) | class Config(object): method __init__ (line 11) | def __init__(self, dataset): class Model (line 32) | class Model(nn.Module): method __init__ (line 34) | def __init__(self, config): method forward (line 41) | def forward(self, x): FILE: models/bert_CNN.py class Config (line 8) | class Config(object): method __init__ (line 11) | def __init__(self, dataset): class Model (line 35) | class Model(nn.Module): method __init__ (line 37) | def __init__(self, config): method conv_and_pool (line 48) | def conv_and_pool(self, x, conv): method forward (line 53) | def forward(self, x): FILE: models/bert_DPCNN.py class Config (line 9) | class Config(object): method __init__ (line 12) | def __init__(self, dataset): class Model (line 34) | class Model(nn.Module): method __init__ (line 36) | def __init__(self, config): method forward (line 50) | def forward(self, x): method _block (line 69) | def _block(self, x): FILE: models/bert_RCNN.py class Config (line 8) | class Config(object): method __init__ (line 11) | def __init__(self, dataset): class Model (line 37) | class Model(nn.Module): method __init__ (line 39) | def __init__(self, config): method forward (line 49) | def forward(self, x): FILE: models/bert_RNN.py class Config (line 8) | class Config(object): method __init__ (line 11) | def __init__(self, dataset): class Model (line 37) | class Model(nn.Module): method __init__ (line 39) | def __init__(self, config): method forward (line 49) | def forward(self, x): FILE: pytorch_pretrained/__main__.py function main (line 2) | def main(): FILE: pytorch_pretrained/convert_gpt2_checkpoint_to_pytorch.py function convert_gpt2_checkpoint_to_pytorch (line 30) | def convert_gpt2_checkpoint_to_pytorch(gpt2_checkpoint_path, gpt2_config... FILE: pytorch_pretrained/convert_openai_checkpoint_to_pytorch.py function convert_openai_checkpoint_to_pytorch (line 30) | def convert_openai_checkpoint_to_pytorch(openai_checkpoint_folder_path, ... FILE: pytorch_pretrained/convert_tf_checkpoint_to_pytorch.py function convert_tf_checkpoint_to_pytorch (line 30) | def convert_tf_checkpoint_to_pytorch(tf_checkpoint_path, bert_config_fil... FILE: pytorch_pretrained/convert_transfo_xl_checkpoint_to_pytorch.py function convert_transfo_xl_checkpoint_to_pytorch (line 47) | def convert_transfo_xl_checkpoint_to_pytorch(tf_checkpoint_path, FILE: pytorch_pretrained/file_utils.py function url_to_filename (line 44) | def url_to_filename(url, etag=None): function filename_to_url (line 62) | def filename_to_url(filename, cache_dir=None): function cached_path (line 88) | def cached_path(url_or_filename, cache_dir=None): function split_s3_path (line 118) | def split_s3_path(url): function s3_request (line 131) | def s3_request(func): function s3_etag (line 151) | def s3_etag(url): function s3_get (line 160) | def s3_get(url, temp_file): function http_get (line 167) | def http_get(url, temp_file): function get_from_cache (line 179) | def get_from_cache(url, cache_dir=None): function read_set_from_file (line 255) | def read_set_from_file(filename): function get_file_extension (line 267) | def get_file_extension(path, dot=True, lower=True): FILE: pytorch_pretrained/modeling.py function load_tf_weights_in_bert (line 51) | def load_tf_weights_in_bert(model, tf_checkpoint_path): function gelu (line 118) | def gelu(x): function swish (line 127) | def swish(x): class BertConfig (line 134) | class BertConfig(object): method __init__ (line 137) | def __init__(self, method from_dict (line 196) | def from_dict(cls, json_object): method from_json_file (line 204) | def from_json_file(cls, json_file): method __repr__ (line 210) | def __repr__(self): method to_dict (line 213) | def to_dict(self): method to_json_string (line 218) | def to_json_string(self): method to_json_file (line 222) | def to_json_file(self, json_file_path): class BertLayerNorm (line 231) | class BertLayerNorm(nn.Module): method __init__ (line 232) | def __init__(self, hidden_size, eps=1e-12): method forward (line 240) | def forward(self, x): class BertEmbeddings (line 246) | class BertEmbeddings(nn.Module): method __init__ (line 249) | def __init__(self, config): method forward (line 260) | def forward(self, input_ids, token_type_ids=None): class BertSelfAttention (line 277) | class BertSelfAttention(nn.Module): method __init__ (line 278) | def __init__(self, config): method transpose_for_scores (line 294) | def transpose_for_scores(self, x): method forward (line 299) | def forward(self, hidden_states, attention_mask): class BertSelfOutput (line 328) | class BertSelfOutput(nn.Module): method __init__ (line 329) | def __init__(self, config): method forward (line 335) | def forward(self, hidden_states, input_tensor): class BertAttention (line 342) | class BertAttention(nn.Module): method __init__ (line 343) | def __init__(self, config): method forward (line 348) | def forward(self, input_tensor, attention_mask): class BertIntermediate (line 354) | class BertIntermediate(nn.Module): method __init__ (line 355) | def __init__(self, config): method forward (line 363) | def forward(self, hidden_states): class BertOutput (line 369) | class BertOutput(nn.Module): method __init__ (line 370) | def __init__(self, config): method forward (line 376) | def forward(self, hidden_states, input_tensor): class BertLayer (line 383) | class BertLayer(nn.Module): method __init__ (line 384) | def __init__(self, config): method forward (line 390) | def forward(self, hidden_states, attention_mask): class BertEncoder (line 397) | class BertEncoder(nn.Module): method __init__ (line 398) | def __init__(self, config): method forward (line 403) | def forward(self, hidden_states, attention_mask, output_all_encoded_la... class BertPooler (line 414) | class BertPooler(nn.Module): method __init__ (line 415) | def __init__(self, config): method forward (line 420) | def forward(self, hidden_states): class BertPredictionHeadTransform (line 429) | class BertPredictionHeadTransform(nn.Module): method __init__ (line 430) | def __init__(self, config): method forward (line 439) | def forward(self, hidden_states): class BertLMPredictionHead (line 446) | class BertLMPredictionHead(nn.Module): method __init__ (line 447) | def __init__(self, config, bert_model_embedding_weights): method forward (line 459) | def forward(self, hidden_states): class BertOnlyMLMHead (line 465) | class BertOnlyMLMHead(nn.Module): method __init__ (line 466) | def __init__(self, config, bert_model_embedding_weights): method forward (line 470) | def forward(self, sequence_output): class BertOnlyNSPHead (line 475) | class BertOnlyNSPHead(nn.Module): method __init__ (line 476) | def __init__(self, config): method forward (line 480) | def forward(self, pooled_output): class BertPreTrainingHeads (line 485) | class BertPreTrainingHeads(nn.Module): method __init__ (line 486) | def __init__(self, config, bert_model_embedding_weights): method forward (line 491) | def forward(self, sequence_output, pooled_output): class BertPreTrainedModel (line 497) | class BertPreTrainedModel(nn.Module): method __init__ (line 501) | def __init__(self, config, *inputs, **kwargs): method init_bert_weights (line 512) | def init_bert_weights(self, module): method from_pretrained (line 526) | def from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwa... class BertModel (line 658) | class BertModel(BertPreTrainedModel): method __init__ (line 702) | def __init__(self, config): method forward (line 709) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class BertForPreTraining (line 741) | class BertForPreTraining(BertPreTrainedModel): method __init__ (line 791) | def __init__(self, config): method forward (line 797) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class BertForMaskedLM (line 812) | class BertForMaskedLM(BertPreTrainedModel): method __init__ (line 854) | def __init__(self, config): method forward (line 860) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class BertForNextSentencePrediction (line 873) | class BertForNextSentencePrediction(BertPreTrainedModel): method __init__ (line 916) | def __init__(self, config): method forward (line 922) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class BertForSequenceClassification (line 935) | class BertForSequenceClassification(BertPreTrainedModel): method __init__ (line 980) | def __init__(self, config, num_labels): method forward (line 988) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class BertForMultipleChoice (line 1001) | class BertForMultipleChoice(BertPreTrainedModel): method __init__ (line 1045) | def __init__(self, config, num_choices): method forward (line 1053) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class BertForTokenClassification (line 1070) | class BertForTokenClassification(BertPreTrainedModel): method __init__ (line 1115) | def __init__(self, config, num_labels): method forward (line 1123) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... class BertForQuestionAnswering (line 1143) | class BertForQuestionAnswering(BertPreTrainedModel): method __init__ (line 1190) | def __init__(self, config): method forward (line 1198) | def forward(self, input_ids, token_type_ids=None, attention_mask=None,... FILE: pytorch_pretrained/modeling_gpt2.py function load_tf_weights_in_gpt2 (line 45) | def load_tf_weights_in_gpt2(model, gpt2_checkpoint_path): function gelu (line 99) | def gelu(x): class GPT2Config (line 103) | class GPT2Config(object): method __init__ (line 107) | def __init__( method from_dict (line 154) | def from_dict(cls, json_object): method from_json_file (line 162) | def from_json_file(cls, json_file): method __repr__ (line 168) | def __repr__(self): method to_dict (line 171) | def to_dict(self): method to_json_string (line 176) | def to_json_string(self): method to_json_file (line 180) | def to_json_file(self, json_file_path): class Conv1D (line 186) | class Conv1D(nn.Module): method __init__ (line 187) | def __init__(self, nf, nx): method forward (line 195) | def forward(self, x): class Attention (line 202) | class Attention(nn.Module): method __init__ (line 203) | def __init__(self, nx, n_ctx, config, scale=False): method _attn (line 215) | def _attn(self, q, k, v): method merge_heads (line 226) | def merge_heads(self, x): method split_heads (line 231) | def split_heads(self, x, k=False): method forward (line 239) | def forward(self, x, layer_past=None): class MLP (line 256) | class MLP(nn.Module): method __init__ (line 257) | def __init__(self, n_state, config): # in MLP: n_state=3072 (4 * n_embd) method forward (line 264) | def forward(self, x): class Block (line 270) | class Block(nn.Module): method __init__ (line 271) | def __init__(self, n_ctx, config, scale=False): method forward (line 279) | def forward(self, x, layer_past=None): class GPT2LMHead (line 287) | class GPT2LMHead(nn.Module): method __init__ (line 290) | def __init__(self, model_embeddings_weights, config): method set_embeddings_weights (line 295) | def set_embeddings_weights(self, model_embeddings_weights): method forward (line 300) | def forward(self, hidden_state): class GPT2MultipleChoiceHead (line 307) | class GPT2MultipleChoiceHead(nn.Module): method __init__ (line 310) | def __init__(self, config): method forward (line 318) | def forward(self, hidden_states, mc_token_ids): class GPT2PreTrainedModel (line 331) | class GPT2PreTrainedModel(nn.Module): method __init__ (line 336) | def __init__(self, config, *inputs, **kwargs): method set_tied (line 348) | def set_tied(self): method init_weights (line 351) | def init_weights(self, module): method from_pretrained (line 365) | def from_pretrained( class GPT2Model (line 483) | class GPT2Model(GPT2PreTrainedModel): method __init__ (line 522) | def __init__(self, config): method forward (line 532) | def forward(self, input_ids, position_ids=None, token_type_ids=None, p... class GPT2LMHeadModel (line 563) | class GPT2LMHeadModel(GPT2PreTrainedModel): method __init__ (line 607) | def __init__(self, config): method set_tied (line 613) | def set_tied(self): method forward (line 618) | def forward(self, input_ids, position_ids=None, token_type_ids=None, l... class GPT2DoubleHeadsModel (line 634) | class GPT2DoubleHeadsModel(GPT2PreTrainedModel): method __init__ (line 683) | def __init__(self, config): method set_tied (line 690) | def set_tied(self): method forward (line 695) | def forward(self, input_ids, mc_token_ids, lm_labels=None, mc_labels=N... FILE: pytorch_pretrained/modeling_openai.py function load_tf_weights_in_openai_gpt (line 46) | def load_tf_weights_in_openai_gpt(model, openai_checkpoint_folder_path): function gelu (line 116) | def gelu(x): function swish (line 120) | def swish(x): class OpenAIGPTConfig (line 127) | class OpenAIGPTConfig(object): method __init__ (line 131) | def __init__( method total_tokens_embeddings (line 196) | def total_tokens_embeddings(self): method from_dict (line 200) | def from_dict(cls, json_object): method from_json_file (line 208) | def from_json_file(cls, json_file): method __repr__ (line 214) | def __repr__(self): method to_dict (line 217) | def to_dict(self): method to_json_string (line 222) | def to_json_string(self): method to_json_file (line 226) | def to_json_file(self, json_file_path): class Conv1D (line 232) | class Conv1D(nn.Module): method __init__ (line 233) | def __init__(self, nf, rf, nx): method forward (line 245) | def forward(self, x): class Attention (line 255) | class Attention(nn.Module): method __init__ (line 256) | def __init__(self, nx, n_ctx, config, scale=False): method _attn (line 270) | def _attn(self, q, k, v): method merge_heads (line 283) | def merge_heads(self, x): method split_heads (line 288) | def split_heads(self, x, k=False): method forward (line 296) | def forward(self, x): class MLP (line 309) | class MLP(nn.Module): method __init__ (line 310) | def __init__(self, n_state, config): # in MLP: n_state=3072 (4 * n_embd) method forward (line 318) | def forward(self, x): class Block (line 324) | class Block(nn.Module): method __init__ (line 325) | def __init__(self, n_ctx, config, scale=False): method forward (line 333) | def forward(self, x): class OpenAIGPTLMHead (line 341) | class OpenAIGPTLMHead(nn.Module): method __init__ (line 344) | def __init__(self, model_embeddings_weights, config): method set_embeddings_weights (line 349) | def set_embeddings_weights(self, model_embeddings_weights): method forward (line 354) | def forward(self, hidden_state): class OpenAIGPTMultipleChoiceHead (line 361) | class OpenAIGPTMultipleChoiceHead(nn.Module): method __init__ (line 364) | def __init__(self, config): method forward (line 374) | def forward(self, hidden_states, mc_token_ids): class OpenAIGPTPreTrainedModel (line 388) | class OpenAIGPTPreTrainedModel(nn.Module): method __init__ (line 393) | def __init__(self, config, *inputs, **kwargs): method init_weights (line 405) | def init_weights(self, module): method set_num_special_tokens (line 418) | def set_num_special_tokens(self, num_special_tokens): method from_pretrained (line 422) | def from_pretrained( class OpenAIGPTModel (line 542) | class OpenAIGPTModel(OpenAIGPTPreTrainedModel): method __init__ (line 593) | def __init__(self, config): method set_num_special_tokens (line 605) | def set_num_special_tokens(self, num_special_tokens): method forward (line 619) | def forward(self, input_ids, position_ids=None, token_type_ids=None): class OpenAIGPTLMHeadModel (line 648) | class OpenAIGPTLMHeadModel(OpenAIGPTPreTrainedModel): method __init__ (line 704) | def __init__(self, config): method set_num_special_tokens (line 710) | def set_num_special_tokens(self, num_special_tokens): method forward (line 717) | def forward(self, input_ids, position_ids=None, token_type_ids=None, l... class OpenAIGPTDoubleHeadsModel (line 732) | class OpenAIGPTDoubleHeadsModel(OpenAIGPTPreTrainedModel): method __init__ (line 793) | def __init__(self, config): method set_num_special_tokens (line 800) | def set_num_special_tokens(self, num_special_tokens): method forward (line 807) | def forward(self, input_ids, mc_token_ids, lm_labels=None, mc_labels=N... FILE: pytorch_pretrained/modeling_transfo_xl.py function build_tf_to_pytorch_map (line 56) | def build_tf_to_pytorch_map(model, config): function load_tf_weights_in_transfo_xl (line 128) | def load_tf_weights_in_transfo_xl(model, config, tf_path): class TransfoXLConfig (line 184) | class TransfoXLConfig(object): method __init__ (line 187) | def __init__(self, method from_dict (line 292) | def from_dict(cls, json_object): method from_json_file (line 300) | def from_json_file(cls, json_file): method __repr__ (line 306) | def __repr__(self): method to_dict (line 309) | def to_dict(self): method to_json_string (line 314) | def to_json_string(self): method to_json_file (line 318) | def to_json_file(self, json_file_path): class PositionalEmbedding (line 324) | class PositionalEmbedding(nn.Module): method __init__ (line 325) | def __init__(self, demb): method forward (line 333) | def forward(self, pos_seq, bsz=None): class PositionwiseFF (line 343) | class PositionwiseFF(nn.Module): method __init__ (line 344) | def __init__(self, d_model, d_inner, dropout, pre_lnorm=False): method forward (line 362) | def forward(self, inp): class MultiHeadAttn (line 378) | class MultiHeadAttn(nn.Module): method __init__ (line 379) | def __init__(self, n_head, d_model, d_head, dropout, dropatt=0, method forward (line 408) | def forward(self, h, attn_mask=None, mems=None): class RelMultiHeadAttn (line 459) | class RelMultiHeadAttn(nn.Module): method __init__ (line 460) | def __init__(self, n_head, d_model, d_head, dropout, dropatt=0, method _parallelogram_mask (line 489) | def _parallelogram_mask(self, h, w, left=False): method _shift (line 500) | def _shift(self, x, qlen, klen, mask, left=False): method _rel_shift (line 518) | def _rel_shift(self, x, zero_triu=False): method forward (line 534) | def forward(self, w, r, attn_mask=None, mems=None): class RelPartialLearnableMultiHeadAttn (line 537) | class RelPartialLearnableMultiHeadAttn(RelMultiHeadAttn): method __init__ (line 538) | def __init__(self, *args, **kwargs): method forward (line 543) | def forward(self, w, r, attn_mask=None, mems=None): class RelLearnableMultiHeadAttn (line 618) | class RelLearnableMultiHeadAttn(RelMultiHeadAttn): method __init__ (line 619) | def __init__(self, *args, **kwargs): method forward (line 622) | def forward(self, w, r_emb, r_w_bias, r_bias, attn_mask=None, mems=None): class DecoderLayer (line 703) | class DecoderLayer(nn.Module): method __init__ (line 704) | def __init__(self, n_head, d_model, d_head, d_inner, dropout, **kwargs): method forward (line 711) | def forward(self, dec_inp, dec_attn_mask=None, mems=None): class RelLearnableDecoderLayer (line 719) | class RelLearnableDecoderLayer(nn.Module): method __init__ (line 720) | def __init__(self, n_head, d_model, d_head, d_inner, dropout, method forward (line 729) | def forward(self, dec_inp, r_emb, r_w_bias, r_bias, dec_attn_mask=None... class RelPartialLearnableDecoderLayer (line 738) | class RelPartialLearnableDecoderLayer(nn.Module): method __init__ (line 739) | def __init__(self, n_head, d_model, d_head, d_inner, dropout, method forward (line 748) | def forward(self, dec_inp, r, dec_attn_mask=None, mems=None): class AdaptiveEmbedding (line 758) | class AdaptiveEmbedding(nn.Module): method __init__ (line 759) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, method forward (line 789) | def forward(self, inp): class TransfoXLPreTrainedModel (line 822) | class TransfoXLPreTrainedModel(nn.Module): method __init__ (line 826) | def __init__(self, config, *inputs, **kwargs): method init_weight (line 837) | def init_weight(self, weight): method init_bias (line 843) | def init_bias(self, bias): method init_weights (line 846) | def init_weights(self, m): method set_num_special_tokens (line 887) | def set_num_special_tokens(self, num_special_tokens): method from_pretrained (line 891) | def from_pretrained(cls, pretrained_model_name_or_path, state_dict=Non... class TransfoXLModel (line 989) | class TransfoXLModel(TransfoXLPreTrainedModel): method __init__ (line 1029) | def __init__(self, config): method backward_compatible (line 1104) | def backward_compatible(self): method reset_length (line 1108) | def reset_length(self, tgt_len, ext_len, mem_len): method init_mems (line 1113) | def init_mems(self, data): method _update_mems (line 1126) | def _update_mems(self, hids, mems, qlen, mlen): method _forward (line 1149) | def _forward(self, dec_inp, mems=None): method forward (line 1239) | def forward(self, input_ids, mems=None): class TransfoXLLMHeadModel (line 1266) | class TransfoXLLMHeadModel(TransfoXLPreTrainedModel): method __init__ (line 1316) | def __init__(self, config): method tie_weights (line 1331) | def tie_weights(self): method reset_length (line 1349) | def reset_length(self, tgt_len, ext_len, mem_len): method init_mems (line 1352) | def init_mems(self, data): method forward (line 1355) | def forward(self, input_ids, target=None, mems=None): FILE: pytorch_pretrained/modeling_transfo_xl_utilities.py class ProjectedAdaptiveLogSoftmax (line 31) | class ProjectedAdaptiveLogSoftmax(nn.Module): method __init__ (line 32) | def __init__(self, n_token, d_embed, d_proj, cutoffs, div_val=1, method _compute_logit (line 78) | def _compute_logit(self, hidden, weight, bias, proj): method forward (line 92) | def forward(self, hidden, target=None, keep_order=False): method log_prob (line 198) | def log_prob(self, hidden): class LogUniformSampler (line 260) | class LogUniformSampler(object): method __init__ (line 261) | def __init__(self, range_max, n_sample): method sample (line 281) | def sample(self, labels): function sample_logits (line 302) | def sample_logits(embedding, bias, labels, inputs, sampler): FILE: pytorch_pretrained/optimization.py class _LRSchedule (line 35) | class _LRSchedule(ABC): method __init__ (line 38) | def __init__(self, warmup=0.002, t_total=-1, **kw): method get_lr (line 53) | def get_lr(self, step, nowarn=False): method get_lr_ (line 73) | def get_lr_(self, progress): class ConstantLR (line 81) | class ConstantLR(_LRSchedule): method get_lr_ (line 82) | def get_lr_(self, progress): class WarmupCosineSchedule (line 86) | class WarmupCosineSchedule(_LRSchedule): method __init__ (line 93) | def __init__(self, warmup=0.002, t_total=-1, cycles=.5, **kw): method get_lr_ (line 103) | def get_lr_(self, progress): class WarmupCosineWithHardRestartsSchedule (line 111) | class WarmupCosineWithHardRestartsSchedule(WarmupCosineSchedule): method __init__ (line 117) | def __init__(self, warmup=0.002, t_total=-1, cycles=1., **kw): method get_lr_ (line 121) | def get_lr_(self, progress): class WarmupCosineWithWarmupRestartsSchedule (line 130) | class WarmupCosineWithWarmupRestartsSchedule(WarmupCosineWithHardRestart... method __init__ (line 136) | def __init__(self, warmup=0.002, t_total=-1, cycles=1., **kw): method get_lr_ (line 141) | def get_lr_(self, progress): class WarmupConstantSchedule (line 151) | class WarmupConstantSchedule(_LRSchedule): method get_lr_ (line 156) | def get_lr_(self, progress): class WarmupLinearSchedule (line 162) | class WarmupLinearSchedule(_LRSchedule): method get_lr_ (line 168) | def get_lr_(self, progress): class BertAdam (line 183) | class BertAdam(Optimizer): method __init__ (line 200) | def __init__(self, params, lr=required, warmup=-1, t_total=-1, schedul... method get_lr (line 225) | def get_lr(self): method step (line 237) | def step(self, closure=None): FILE: pytorch_pretrained/optimization_openai.py class OpenAIAdam (line 29) | class OpenAIAdam(Optimizer): method __init__ (line 32) | def __init__(self, params, lr=required, schedule='warmup_linear', warm... method get_lr (line 58) | def get_lr(self): method step (line 70) | def step(self, closure=None): FILE: pytorch_pretrained/tokenization.py function load_vocab (line 50) | def load_vocab(vocab_file): function whitespace_tokenize (line 65) | def whitespace_tokenize(text): class BertTokenizer (line 74) | class BertTokenizer(object): method __init__ (line 77) | def __init__(self, vocab_file, do_lower_case=True, max_len=None, do_ba... method tokenize (line 107) | def tokenize(self, text): method convert_tokens_to_ids (line 117) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 130) | def convert_ids_to_tokens(self, ids): method save_vocabulary (line 137) | def save_vocabulary(self, vocab_path): method from_pretrained (line 153) | def from_pretrained(cls, pretrained_model_name_or_path, cache_dir=None... class BasicTokenizer (line 201) | class BasicTokenizer(object): method __init__ (line 204) | def __init__(self, method tokenize (line 215) | def tokenize(self, text): method _run_strip_accents (line 236) | def _run_strip_accents(self, text): method _run_split_on_punc (line 247) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 269) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 282) | def _is_chinese_char(self, cp): method _clean_text (line 304) | def _clean_text(self, text): class WordpieceTokenizer (line 318) | class WordpieceTokenizer(object): method __init__ (line 321) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 326) | def tokenize(self, text): function _is_whitespace (line 378) | def _is_whitespace(char): function _is_control (line 390) | def _is_control(char): function _is_punctuation (line 402) | def _is_punctuation(char): FILE: pytorch_pretrained/tokenization_gpt2.py function lru_cache (line 31) | def lru_cache(): function bytes_to_unicode (line 52) | def bytes_to_unicode(): function get_pairs (line 74) | def get_pairs(word): class GPT2Tokenizer (line 86) | class GPT2Tokenizer(object): method from_pretrained (line 92) | def from_pretrained(cls, pretrained_model_name_or_path, cache_dir=None... method __init__ (line 144) | def __init__(self, vocab_file, merges_file, errors='replace', special_... method __len__ (line 163) | def __len__(self): method set_special_tokens (line 166) | def set_special_tokens(self, special_tokens): method bpe (line 179) | def bpe(self, token): method tokenize (line 220) | def tokenize(self, text): method convert_tokens_to_ids (line 228) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 249) | def convert_ids_to_tokens(self, ids, skip_special_tokens=False): method encode (line 260) | def encode(self, text): method decode (line 263) | def decode(self, tokens): method save_vocabulary (line 268) | def save_vocabulary(self, vocab_path): FILE: pytorch_pretrained/tokenization_openai.py function get_pairs (line 46) | def get_pairs(word): function text_standardize (line 58) | def text_standardize(text): class OpenAIGPTTokenizer (line 73) | class OpenAIGPTTokenizer(object): method from_pretrained (line 82) | def from_pretrained(cls, pretrained_model_name_or_path, cache_dir=None... method __init__ (line 134) | def __init__(self, vocab_file, merges_file, special_tokens=None, max_l... method __len__ (line 157) | def __len__(self): method set_special_tokens (line 160) | def set_special_tokens(self, special_tokens): method bpe (line 176) | def bpe(self, token): method tokenize (line 219) | def tokenize(self, text): method convert_tokens_to_ids (line 234) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 255) | def convert_ids_to_tokens(self, ids, skip_special_tokens=False): method encode (line 266) | def encode(self, text): method decode (line 269) | def decode(self, ids, skip_special_tokens=False, clean_up_tokenization... method save_vocabulary (line 280) | def save_vocabulary(self, vocab_path): FILE: pytorch_pretrained/tokenization_transfo_xl.py class TransfoXLTokenizer (line 53) | class TransfoXLTokenizer(object): method from_pretrained (line 58) | def from_pretrained(cls, pretrained_model_name_or_path, cache_dir=None... method __init__ (line 96) | def __init__(self, special=[], min_freq=0, max_size=None, lower_case=F... method count_file (line 107) | def count_file(self, path, verbose=False, add_eos=False): method count_sents (line 122) | def count_sents(self, sents, verbose=False): method _build_from_file (line 132) | def _build_from_file(self, vocab_file): method save_vocabulary (line 147) | def save_vocabulary(self, vocab_path): method build_vocab (line 155) | def build_vocab(self): method encode_file (line 176) | def encode_file(self, path, ordered=False, verbose=False, add_eos=True, method encode_sents (line 194) | def encode_sents(self, sents, ordered=False, verbose=False): method add_special (line 207) | def add_special(self, sym): method add_symbol (line 213) | def add_symbol(self, sym): method get_sym (line 218) | def get_sym(self, idx): method get_idx (line 222) | def get_idx(self, sym): method convert_ids_to_tokens (line 238) | def convert_ids_to_tokens(self, indices): method convert_tokens_to_ids (line 242) | def convert_tokens_to_ids(self, symbols): method convert_to_tensor (line 246) | def convert_to_tensor(self, symbols): method decode (line 249) | def decode(self, indices, exclude=None): method __len__ (line 256) | def __len__(self): method tokenize (line 259) | def tokenize(self, line, add_eos=False, add_double_eos=False): class LMOrderedIterator (line 279) | class LMOrderedIterator(object): method __init__ (line 280) | def __init__(self, data, bsz, bptt, device='cpu', ext_len=None): method get_batch (line 302) | def get_batch(self, i, bptt=None): method get_fixlen_iter (line 317) | def get_fixlen_iter(self, start=0): method get_varlen_iter (line 321) | def get_varlen_iter(self, start=0, std=5, min_len=5, max_deviation=3): method __iter__ (line 333) | def __iter__(self): class LMShuffledIterator (line 337) | class LMShuffledIterator(object): method __init__ (line 338) | def __init__(self, data, bsz, bptt, device='cpu', ext_len=None, shuffl... method get_sent_stream (line 351) | def get_sent_stream(self): method stream_iterator (line 360) | def stream_iterator(self, sent_stream): method __iter__ (line 409) | def __iter__(self): class LMMultiFileIterator (line 417) | class LMMultiFileIterator(LMShuffledIterator): method __init__ (line 418) | def __init__(self, paths, vocab, bsz, bptt, device='cpu', ext_len=None, method get_sent_stream (line 431) | def get_sent_stream(self, path): method __iter__ (line 439) | def __iter__(self): class TransfoXLCorpus (line 450) | class TransfoXLCorpus(object): method from_pretrained (line 452) | def from_pretrained(cls, pretrained_model_name_or_path, cache_dir=None... method __init__ (line 494) | def __init__(self, *args, **kwargs): method build_corpus (line 501) | def build_corpus(self, path, dataset): method get_iterator (line 540) | def get_iterator(self, split, *args, **kwargs): function get_lm_corpus (line 557) | def get_lm_corpus(datadir, dataset): FILE: train_eval.py function init_network (line 13) | def init_network(model, method='xavier', exclude='embedding', seed=123): function train (line 31) | def train(config, model, train_iter, dev_iter, test_iter): function test (line 85) | def test(config, model, test_iter): function evaluate (line 101) | def evaluate(config, model, data_iter, test=False): FILE: utils.py function build_dataset (line 10) | def build_dataset(config): class DatasetIterater (line 42) | class DatasetIterater(object): method __init__ (line 43) | def __init__(self, batches, batch_size, device): method _to_tensor (line 53) | def _to_tensor(self, datas): method __next__ (line 62) | def __next__(self): method __iter__ (line 78) | def __iter__(self): method __len__ (line 81) | def __len__(self): function build_iterator (line 88) | def build_iterator(dataset, config): function get_time_dif (line 93) | def get_time_dif(start_time):