MCPcopy Create free account

hub / github.com/649453932/Bert-Chinese-Text-Classification-Pytorch / functions

Functions349 in github.com/649453932/Bert-Chinese-Text-Classification-Pytorch

↓ 23 callersMethod__init__
(self, config)
pytorch_pretrained/modeling.py:384
↓ 14 callersFunctioncached_path
Given something that might be a URL (or might be a local path), determine which. If it's a URL, download the file and cache it, and retur
pytorch_pretrained/file_utils.py:88
↓ 12 callersMethod__init__
(self, n_head, d_model, d_head, d_inner, dropout, **kwargs)
pytorch_pretrained/modeling_transfo_xl.py:704
↓ 12 callersMethodfrom_pretrained
Instantiate a PreTrainedBertModel from a pre-trained model file. Download and cache the pre-trained model file if needed.
pytorch_pretrained/tokenization.py:153
↓ 11 callersMethodload
(module, prefix='')
pytorch_pretrained/modeling.py:635
↓ 9 callersMethod__init__
(self, n_state, config)
pytorch_pretrained/modeling_gpt2.py:257
↓ 9 callersMethod__init__
(self, n_state, config)
pytorch_pretrained/modeling_openai.py:310
↓ 9 callersMethodencode_file
(self, path, ordered=False, verbose=False, add_eos=True, add_double_eos=False)
pytorch_pretrained/tokenization_transfo_xl.py:176
↓ 6 callersMethod_compute_logit
(self, hidden, weight, bias, proj)
pytorch_pretrained/modeling_transfo_xl_utilities.py:78
↓ 6 callersMethodinit_weight
(self, weight)
pytorch_pretrained/modeling_transfo_xl.py:837
↓ 4 callersMethod__init__
(self, params, lr=required, warmup=-1, t_total=-1, schedule='warmup_linear', b1=0.9, b2=0.999
pytorch_pretrained/optimization.py:200
↓ 4 callersMethodcount_file
(self, path, verbose=False, add_eos=False)
pytorch_pretrained/tokenization_transfo_xl.py:107
↓ 4 callersMethodinit_bias
(self, bias)
pytorch_pretrained/modeling_transfo_xl.py:843
↓ 4 callersMethodload
(module, prefix="")
pytorch_pretrained/modeling_openai.py:509
↓ 3 callersFunctionbuild_iterator
(dataset, config)
utils.py:88
↓ 3 callersMethodget_sym
(self, idx)
pytorch_pretrained/tokenization_transfo_xl.py:218
↓ 3 callersFunctionget_time_dif
获取已使用时间
utils.py:93
↓ 3 callersFunctionload_dataset
(path, pad_size=32)
utils.py:12
↓ 3 callersMethodset_embeddings_weights
(self, model_embeddings_weights)
pytorch_pretrained/modeling_gpt2.py:295
↓ 3 callersMethodset_embeddings_weights
(self, model_embeddings_weights)
pytorch_pretrained/modeling_openai.py:349
↓ 3 callersMethodset_num_special_tokens
Update input embeddings with new embedding matrice if needed
pytorch_pretrained/modeling_openai.py:605
↓ 3 callersMethodsplit_heads
(self, x, k=False)
pytorch_pretrained/modeling_gpt2.py:231
↓ 3 callersMethodsplit_heads
(self, x, k=False)
pytorch_pretrained/modeling_openai.py:288
↓ 3 callersMethodto_json_string
Serializes this instance to a JSON string.
pytorch_pretrained/modeling_transfo_xl.py:314
↓ 3 callersMethodto_json_string
Serializes this instance to a JSON string.
pytorch_pretrained/modeling_gpt2.py:176
↓ 3 callersMethodto_json_string
Serializes this instance to a JSON string.
pytorch_pretrained/modeling_openai.py:222
↓ 3 callersMethodtranspose_for_scores
(self, x)
pytorch_pretrained/modeling.py:294
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
pytorch_pretrained/tokenization.py:65
↓ 2 callersMethod_rel_shift
(self, x, zero_triu=False)
pytorch_pretrained/modeling_transfo_xl.py:518
↓ 2 callersMethod_to_tensor
(self, datas)
utils.py:53
↓ 2 callersMethodadd_symbol
(self, sym)
pytorch_pretrained/tokenization_transfo_xl.py:213
↓ 2 callersMethodbpe
(self, token)
pytorch_pretrained/tokenization_openai.py:176
↓ 2 callersFunctionconvert_gpt2_checkpoint_to_pytorch
(gpt2_checkpoint_path, gpt2_config_file, pytorch_dump_folder_path)
pytorch_pretrained/convert_gpt2_checkpoint_to_pytorch.py:30
↓ 2 callersFunctionconvert_openai_checkpoint_to_pytorch
(openai_checkpoint_folder_path, openai_config_file, pytorch_dump_folder_path)
pytorch_pretrained/convert_openai_checkpoint_to_pytorch.py:30
↓ 2 callersFunctionconvert_tf_checkpoint_to_pytorch
(tf_checkpoint_path, bert_config_file, pytorch_dump_path)
pytorch_pretrained/convert_tf_checkpoint_to_pytorch.py:30
↓ 2 callersMethodconvert_to_tensor
(self, symbols)
pytorch_pretrained/tokenization_transfo_xl.py:246
↓ 2 callersFunctionconvert_transfo_xl_checkpoint_to_pytorch
(tf_checkpoint_path, transfo_xl_config_file,
pytorch_pretrained/convert_transfo_xl_checkpoint_to_pytorch.py:47
↓ 2 callersMethodencode
(self, text)
pytorch_pretrained/tokenization_gpt2.py:260
↓ 2 callersFunctionevaluate
(config, model, data_iter, test=False)
train_eval.py:101
↓ 2 callersMethodfrom_json_file
Constructs a `BertConfig` from a json file of parameters.
pytorch_pretrained/modeling.py:204
↓ 2 callersMethodget_batch
(self, i, bptt=None)
pytorch_pretrained/tokenization_transfo_xl.py:302
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. word is represented as tuple of symbols (symbols being variable-length strings)
pytorch_pretrained/tokenization_openai.py:46
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
pytorch_pretrained/tokenization_gpt2.py:74
↓ 2 callersMethodinit_mems
(self, data)
pytorch_pretrained/modeling_transfo_xl.py:1113
↓ 2 callersFunctionload_tf_weights_in_bert
Load tf checkpoints in a pytorch model
pytorch_pretrained/modeling.py:51
↓ 2 callersFunctionload_tf_weights_in_gpt2
Load tf checkpoints in a pytorch model
pytorch_pretrained/modeling_gpt2.py:45
↓ 2 callersFunctionload_tf_weights_in_openai_gpt
Load tf pre-trained weights in a pytorch model (from NumPy arrays here)
pytorch_pretrained/modeling_openai.py:46
↓ 2 callersFunctionload_tf_weights_in_transfo_xl
Load tf checkpoints in a pytorch model
pytorch_pretrained/modeling_transfo_xl.py:128
↓ 2 callersFunctionsample_logits
embedding: an nn.Embedding layer bias: [n_vocab] labels: [b1, b2] inputs: [b1, b2, n_emb] sampler: you may us
pytorch_pretrained/modeling_transfo_xl_utilities.py:302
↓ 2 callersFunctionsplit_s3_path
Split a full s3 path into the bucket name and path.
pytorch_pretrained/file_utils.py:118
↓ 2 callersMethodstream_iterator
(self, sent_stream)
pytorch_pretrained/tokenization_transfo_xl.py:360
↓ 2 callersMethodtie_weights
Run this to be sure output and input (adaptive) softmax weights are tied
pytorch_pretrained/modeling_transfo_xl.py:1331
↓ 2 callersMethodto_json_string
Serializes this instance to a JSON string.
pytorch_pretrained/modeling.py:218
↓ 2 callersMethodtokenize
(self, line, add_eos=False, add_double_eos=False)
pytorch_pretrained/tokenization_transfo_xl.py:259
↓ 1 callersMethod__init__
Reference : https://github.com/tensorflow/tensorflow/blob/r1.10/tensorflow/python/ops/candidate_sampling_ops.py `P(class) = (log(
pytorch_pretrained/modeling_transfo_xl_utilities.py:261
↓ 1 callersMethod_attn
(self, q, k, v)
pytorch_pretrained/modeling_gpt2.py:215
↓ 1 callersMethod_attn
(self, q, k, v)
pytorch_pretrained/modeling_openai.py:270
↓ 1 callersMethod_block
(self, x)
models/bert_DPCNN.py:69
↓ 1 callersMethod_build_from_file
(self, vocab_file)
pytorch_pretrained/tokenization_transfo_xl.py:132
↓ 1 callersMethod_clean_text
Performs invalid character removal and whitespace cleanup on text.
pytorch_pretrained/tokenization.py:304
↓ 1 callersMethod_forward
(self, dec_inp, mems=None)
pytorch_pretrained/modeling_transfo_xl.py:1149
↓ 1 callersMethod_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
pytorch_pretrained/tokenization.py:282
↓ 1 callersFunction_is_control
Checks whether `chars` is a control character.
pytorch_pretrained/tokenization.py:390
↓ 1 callersFunction_is_punctuation
Checks whether `chars` is a punctuation character.
pytorch_pretrained/tokenization.py:402
↓ 1 callersFunction_is_whitespace
Checks whether `chars` is a whitespace character.
pytorch_pretrained/tokenization.py:378
↓ 1 callersMethod_run_split_on_punc
Splits punctuation on a piece of text.
pytorch_pretrained/tokenization.py:247
↓ 1 callersMethod_run_strip_accents
Strips accents from a piece of text.
pytorch_pretrained/tokenization.py:236
↓ 1 callersMethod_tokenize_chinese_chars
Adds whitespace around any CJK character.
pytorch_pretrained/tokenization.py:269
↓ 1 callersMethod_update_mems
(self, hids, mems, qlen, mlen)
pytorch_pretrained/modeling_transfo_xl.py:1126
↓ 1 callersMethodadd_special
(self, sym)
pytorch_pretrained/tokenization_transfo_xl.py:207
↓ 1 callersMethodbpe
(self, token)
pytorch_pretrained/tokenization_gpt2.py:179
↓ 1 callersFunctionbuild_dataset
(config)
utils.py:10
↓ 1 callersFunctionbuild_tf_to_pytorch_map
A map of modules from TF to PyTorch. This time I use a map to keep the PyTorch model as identical to the original PyTorch model as possible.
pytorch_pretrained/modeling_transfo_xl.py:56
↓ 1 callersMethodbuild_vocab
(self)
pytorch_pretrained/tokenization_transfo_xl.py:155
↓ 1 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
pytorch_pretrained/tokenization_gpt2.py:52
↓ 1 callersMethodconv_and_pool
(self, x, conv)
models/bert_CNN.py:48
↓ 1 callersMethodconvert_ids_to_tokens
Converts a sequence of ids in BPE tokens using the vocab.
pytorch_pretrained/tokenization_openai.py:255
↓ 1 callersMethodconvert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
pytorch_pretrained/tokenization_openai.py:234
↓ 1 callersMethodconvert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
pytorch_pretrained/tokenization.py:117
↓ 1 callersMethodconvert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
pytorch_pretrained/tokenization_gpt2.py:228
↓ 1 callersMethodconvert_tokens_to_ids
Converts a sequence of symbols into ids using the vocab.
pytorch_pretrained/tokenization_transfo_xl.py:242
↓ 1 callersMethoddecode
(self, tokens)
pytorch_pretrained/tokenization_gpt2.py:263
↓ 1 callersMethodfrom_dict
Constructs a `TransfoXLConfig` from a Python dictionary of parameters.
pytorch_pretrained/modeling_transfo_xl.py:292
↓ 1 callersMethodfrom_dict
Constructs a `GPT2Config` from a Python dictionary of parameters.
pytorch_pretrained/modeling_gpt2.py:154
↓ 1 callersMethodfrom_dict
Constructs a `BertConfig` from a Python dictionary of parameters.
pytorch_pretrained/modeling.py:196
↓ 1 callersMethodfrom_dict
Constructs a `OpenAIGPTConfig` from a Python dictionary of parameters.
pytorch_pretrained/modeling_openai.py:200
↓ 1 callersMethodfrom_json_file
Constructs a `TransfoXLConfig` from a json file of parameters.
pytorch_pretrained/modeling_transfo_xl.py:300
↓ 1 callersMethodfrom_json_file
Constructs a `GPT2Config` from a json file of parameters.
pytorch_pretrained/modeling_gpt2.py:162
↓ 1 callersMethodfrom_json_file
Constructs a `OpenAIGPTConfig` from a json file of parameters.
pytorch_pretrained/modeling_openai.py:208
↓ 1 callersMethodget_fixlen_iter
(self, start=0)
pytorch_pretrained/tokenization_transfo_xl.py:317
↓ 1 callersFunctionget_from_cache
Given a URL, look for the corresponding dataset in the local cache. If it's not there, download it. Then return the path to the cached file.
pytorch_pretrained/file_utils.py:179
↓ 1 callersMethodget_idx
(self, sym)
pytorch_pretrained/tokenization_transfo_xl.py:222
↓ 1 callersMethodget_lr
(self)
pytorch_pretrained/optimization.py:225
↓ 1 callersMethodget_lr
(self)
pytorch_pretrained/optimization_openai.py:58
↓ 1 callersMethodget_lr_
:param progress: value between 0 and 1 (unless going beyond t_total steps) specifying training progress :return: learni
pytorch_pretrained/optimization.py:73
↓ 1 callersMethodget_sent_stream
(self)
pytorch_pretrained/tokenization_transfo_xl.py:351
↓ 1 callersMethodget_sent_stream
(self, path)
pytorch_pretrained/tokenization_transfo_xl.py:431
↓ 1 callersFunctionhttp_get
(url, temp_file)
pytorch_pretrained/file_utils.py:167
↓ 1 callersMethodinit_weights
Initialize the weights.
pytorch_pretrained/modeling_openai.py:405
↓ 1 callersMethodload
(module, prefix='')
pytorch_pretrained/modeling_transfo_xl.py:961
next →1–100 of 349, ranked by callers