Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/649453932/Bert-Chinese-Text-Classification-Pytorch
/ functions
Functions
349 in github.com/649453932/Bert-Chinese-Text-Classification-Pytorch
⨍
Functions
349
◇
Types & classes
95
Method
from_pretrained
Instantiate a pre-processed corpus.
pytorch_pretrained/tokenization_transfo_xl.py:452
Method
from_pretrained
Instantiate a GPT2PreTrainedModel from a pre-trained model file or a pytorch state dict. Download and cache the pre-trained model fil
pytorch_pretrained/modeling_gpt2.py:365
Method
from_pretrained
Instantiate a BertPreTrainedModel from a pre-trained model file or a pytorch state dict. Download and cache the pre-trained model fil
pytorch_pretrained/modeling.py:526
Method
from_pretrained
Instantiate a OpenAIGPTPreTrainedModel from a pre-trained model file or a pytorch state dict. Download and cache the pre-trained mode
pytorch_pretrained/modeling_openai.py:422
Function
gelu
(x)
pytorch_pretrained/modeling_gpt2.py:99
Function
gelu
Implementation of the gelu activation function. For information: OpenAI GPT's gelu is slightly different (and gives slightly different results
pytorch_pretrained/modeling.py:118
Function
gelu
(x)
pytorch_pretrained/modeling_openai.py:116
Function
get_file_extension
(path, dot=True, lower=True)
pytorch_pretrained/file_utils.py:267
Method
get_iterator
(self, split, *args, **kwargs)
pytorch_pretrained/tokenization_transfo_xl.py:540
Function
get_lm_corpus
(datadir, dataset)
pytorch_pretrained/tokenization_transfo_xl.py:557
Method
get_lr
:param step: which of t_total steps we're on :param nowarn: set to True to suppress warning regarding training beyond specified '
pytorch_pretrained/optimization.py:53
Method
get_lr_
(self, progress)
pytorch_pretrained/optimization.py:82
Method
get_lr_
(self, progress)
pytorch_pretrained/optimization.py:103
Method
get_lr_
(self, progress)
pytorch_pretrained/optimization.py:121
Method
get_lr_
(self, progress)
pytorch_pretrained/optimization.py:141
Method
get_lr_
(self, progress)
pytorch_pretrained/optimization.py:156
Method
get_lr_
(self, progress)
pytorch_pretrained/optimization.py:168
Method
get_varlen_iter
(self, start=0, std=5, min_len=5, max_deviation=3)
pytorch_pretrained/tokenization_transfo_xl.py:321
Method
init_bert_weights
Initialize the weights.
pytorch_pretrained/modeling.py:512
Method
init_mems
(self, data)
pytorch_pretrained/modeling_transfo_xl.py:1352
Function
init_network
(model, method='xavier', exclude='embedding', seed=123)
train_eval.py:13
Method
init_weights
Initialize the weights.
pytorch_pretrained/modeling_transfo_xl.py:846
Method
init_weights
Initialize the weights.
pytorch_pretrained/modeling_gpt2.py:351
Method
log_prob
r""" Computes log probabilities for all :math:`n\_classes` From: https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/adaptive.py
pytorch_pretrained/modeling_transfo_xl_utilities.py:198
Function
lru_cache
()
pytorch_pretrained/tokenization_gpt2.py:31
Function
read_set_from_file
Extract a de-duped collection (set) of text from a file. Expected file format is one item per line.
pytorch_pretrained/file_utils.py:255
Method
reset_length
(self, tgt_len, ext_len, mem_len)
pytorch_pretrained/modeling_transfo_xl.py:1349
Function
s3_request
Wrapper function for s3 requests in order to create more helpful error messages.
pytorch_pretrained/file_utils.py:131
Method
save_vocabulary
Save the tokenizer vocabulary and merge files to a directory.
pytorch_pretrained/tokenization_openai.py:280
Method
save_vocabulary
Save the tokenizer vocabulary to a directory or file.
pytorch_pretrained/tokenization.py:137
Method
save_vocabulary
Save the tokenizer vocabulary and merge files to a directory.
pytorch_pretrained/tokenization_gpt2.py:268
Method
save_vocabulary
Save the tokenizer vocabulary to a directory or file.
pytorch_pretrained/tokenization_transfo_xl.py:147
Method
set_num_special_tokens
(self, num_special_tokens)
pytorch_pretrained/modeling_transfo_xl.py:887
Method
set_num_special_tokens
(self, num_special_tokens)
pytorch_pretrained/modeling_openai.py:418
Method
set_num_special_tokens
Update input and output embeddings with new embedding matrice Make sure we are sharing the embeddings
pytorch_pretrained/modeling_openai.py:710
Method
set_num_special_tokens
Update input and output embeddings with new embedding matrice Make sure we are sharing the embeddings
pytorch_pretrained/modeling_openai.py:800
Method
set_tied
(self)
pytorch_pretrained/modeling_gpt2.py:348
Method
set_tied
Make sure we are sharing the embeddings
pytorch_pretrained/modeling_gpt2.py:690
Method
step
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
pytorch_pretrained/optimization_openai.py:70
Function
swish
(x)
pytorch_pretrained/modeling.py:127
Function
swish
(x)
pytorch_pretrained/modeling_openai.py:120
Method
to_json_file
Save this instance to a json file.
pytorch_pretrained/modeling_transfo_xl.py:318
Method
to_json_file
Save this instance to a json file.
pytorch_pretrained/modeling_gpt2.py:180
Method
to_json_file
Save this instance to a json file.
pytorch_pretrained/modeling.py:222
Method
to_json_file
Save this instance to a json file.
pytorch_pretrained/modeling_openai.py:226
Method
tokenize
Tokenizes a piece of text.
pytorch_pretrained/tokenization.py:215
Method
tokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the gi
pytorch_pretrained/tokenization.py:326
Method
total_tokens_embeddings
(self)
pytorch_pretrained/modeling_openai.py:196
Function
wrapper
(url, *args, **kwargs)
pytorch_pretrained/file_utils.py:138
← previous
301–349 of 349, ranked by callers