Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tencent/NeuralNLP-NeuralClassifier
/ functions
Functions
190 in github.com/Tencent/NeuralNLP-NeuralClassifier
⨍
Functions
190
◇
Types & classes
58
Method
__init__
(self, dataset, config)
model/classification/hmcn.py:28
Method
__init__
(self, dataset, config)
model/classification/dpcnn.py:28
Method
__init__
(self, dataset, config)
model/classification/transformer.py:25
Method
__init__
(self, dataset, config)
model/classification/textrnn.py:45
Method
__init__
(self, dataset, config)
model/classification/attentive_convolution.py:49
Method
__init__
all convolutional blocks 4 kinds of conv blocks, which #feature_map are 64,128,256,512 Depth: 9 17 29 49 --------
model/classification/textvdcnn.py:27
Method
__init__
(self, dataset, config)
model/classification/drnn.py:25
Method
__new__
(cls, *args, **kw)
util.py:47
Method
_append_vocab
(ori_vocabs, vocabs, max_len)
dataset/collator.py:84
Method
_append_vocab
(sample, vocabs, offsets, lens, name)
dataset/collator.py:174
Method
_format
Format evaluation string. Args: category: Category evaluation to format. Returns:
evaluate/classification_evaluate.py:400
Method
_get_attn_key_pad_mask
For masking out the padding part of key sequence.
model/classification/transformer.py:82
Method
_get_non_pad_mask
(seq, pad)
model/classification/transformer.py:78
Method
_get_vocab_id_list
Use dict to convert all vocabs to ids
dataset/classification_dataset.py:148
Method
_init_confusion_matrix
Init confusion matrix. Args: label_map: Label map. Returns: confusion_matrix.
evaluate/classification_evaluate.py:183
Method
_init_count_dict
Init count dict. Args: label_map: Label map. Returns: count_dict.
evaluate/classification_evaluate.py:197
Method
_init_dict
(self)
dataset/classification_dataset.py:58
Method
_init_weight
(self, m)
model/classification/hmcn.py:66
Method
_insert_vocab
(files, _mode=InsertVocabMode.ALL)
dataset/dataset.py:85
Method
_insert_vocab
Insert vocab to dict
dataset/classification_dataset.py:130
Method
_reshape_permute
(x, d, head_number)
model/layers.py:134
Method
cal_angle
(position, hid_idx)
model/embedding.py:231
Method
convolutional_block
Convolutional Block of VDCNN Convolutional block contains 2 conv layers, and can be repeated Temp Conv-->Batch Norm-->ReLU-->T
model/classification/textvdcnn.py:95
Method
debug
Log debug message msg: Message to log
util.py:70
Method
error
Log error message msg: Message to log
util.py:94
Method
forward
Args: logits: model's output, shape of [batch_size, num_cls] target: ground truth labels, shape of [batch_size]
model/loss.py:64
Method
forward
(self, logits, target, use_hierar=False, is_multi=False, *argv
model/loss.py:119
Method
forward
(self, inputs)
model/layers.py:36
Method
forward
(self, s, h)
model/layers.py:59
Method
forward
(self, s, h)
model/layers.py:69
Method
forward
(self, s, h)
model/layers.py:84
Method
forward
(self, q, k, v)
model/layers.py:108
Method
forward
(self, q, k, v)
model/layers.py:133
Method
forward
(self, x, gate_input=None, forward_input=None)
model/layers.py:163
Method
forward
(self, x)
model/transformer_encoder.py:39
Method
forward
(self, enc_input, non_pad_mask=None, slf_attn_mask=None)
model/transformer_encoder.py:58
Method
forward
(self, h, e, s, non_pad_mask=None, slf_attn_mask=None)
model/transformer_encoder.py:79
Method
forward
(self, q, k, v, mask=None)
model/attention.py:32
Method
forward
(self, q, k, v, mask=None)
model/attention.py:74
Method
forward
Args: inputs: seq_lengths: init_state: ori_state: If true, will return ori state generate by
model/rnn.py:63
Method
forward
(self, vocab_ids, offset=None)
model/embedding.py:94
Method
forward
(self, vocab_ids)
model/embedding.py:169
Method
forward
(self, src_pos)
model/embedding.py:225
Method
forward
(self, batch)
model/classification/textcnn.py:56
Method
forward
(self, batch)
model/classification/fasttext.py:109
Method
forward
(self, batch)
model/classification/classifier.py:129
Method
forward
(self, batch)
model/classification/region_embedding.py:41
Method
forward
(self, batch)
model/classification/textrcnn.py:70
Method
forward
(self, batch)
model/classification/hmcn.py:88
Method
forward
(self, batch)
model/classification/dpcnn.py:61
Method
forward
(self, batch)
model/classification/transformer.py:77
Method
forward
(self, batch)
model/classification/textrnn.py:78
Method
forward
(self, batch)
model/classification/attentive_convolution.py:136
Method
forward
(self, batch)
model/classification/textvdcnn.py:94
Method
forward
(self, batch)
model/classification/drnn.py:56
Method
get_lr
(self)
model/optimizer.py:106
Method
get_parameter_optimizer_dict
(self)
model/classification/textcnn.py:38
Method
get_parameter_optimizer_dict
(self)
model/classification/fasttext.py:87
Method
get_parameter_optimizer_dict
(self)
model/classification/classifier.py:111
Method
get_parameter_optimizer_dict
(self)
model/classification/region_embedding.py:37
Method
get_parameter_optimizer_dict
(self)
model/classification/textrcnn.py:51
Method
get_parameter_optimizer_dict
(self)
model/classification/dpcnn.py:54
Method
get_parameter_optimizer_dict
(self)
model/classification/transformer.py:60
Method
get_parameter_optimizer_dict
(self)
model/classification/textrnn.py:62
Method
get_parameter_optimizer_dict
(self)
model/classification/attentive_convolution.py:111
Method
get_parameter_optimizer_dict
(self)
model/classification/textvdcnn.py:71
Method
get_parameter_optimizer_dict
(self)
model/classification/drnn.py:46
Method
get_posi_angle_vec
(position)
model/embedding.py:234
Method
str
(cls)
util.py:24
Method
str
(cls)
util.py:40
Method
str
(self)
dataset/dataset.py:40
Method
str
(cls)
model/loss.py:44
Method
str
(cls)
model/model_util.py:31
Method
str
(self)
model/model_util.py:59
Method
str
(self)
model/model_util.py:119
Method
str
(cls)
model/embedding.py:38
Method
str
(cls)
model/embedding.py:58
Method
str
(cls)
model/embedding.py:137
Method
str
(cls)
model/classification/attentive_convolution.py:30
Method
str
(cls)
model/classification/attentive_convolution.py:40
Method
update_lr
Update lr
model/classification/textcnn.py:46
Method
update_lr
Update lr
model/classification/fasttext.py:99
Method
update_lr
Update lr
model/classification/classifier.py:119
Method
update_lr
model/classification/textrcnn.py:60
Method
update_lr
(self, optimizer, epoch)
model/classification/transformer.py:69
Method
update_lr
(self, optimizer, epoch)
model/classification/textrnn.py:70
Method
update_lr
Update lr
model/classification/textvdcnn.py:84
Function
warmup_constant
(x, warmup=0.002)
model/optimizer.py:44
Function
warmup_cosine
(x, warmup=0.002)
model/optimizer.py:38
Function
warmup_linear
(x, warmup=0.002)
model/optimizer.py:50
← previous
101–190 of 190, ranked by callers