Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/brightmart/text_classification
/ functions
Functions
642 in github.com/brightmart/text_classification
⨍
Functions
642
◇
Types & classes
45
↓ 1 callers
Function
get_label_using_logits_with_value
(logits,vocabulary_index2word_label,top_number=5)
a02_TextCNN/other_experiement/p7_TextCNN_predict_exp.py:146
↓ 1 callers
Function
get_label_using_prob
(prob,top_number=5)
a00_Bert/utils.py:207
↓ 1 callers
Function
get_label_y
(input_x)
a02_TextCNN/p7_TextCNN_model.py:235
↓ 1 callers
Function
get_label_y
(input_x)
a02_TextCNN/other_experiement/p7_TextCNN_model_multilayers.py:180
↓ 1 callers
Method
get_labels
Gets the list of labels for this data set.
a00_Bert/run_classifier_predict_online.py:101
↓ 1 callers
Method
get_labels
Gets the list of labels for this data set.
a00_Bert/unused/run_classifier_multi_labels_bert.py:181
↓ 1 callers
Function
get_logits_by_input_exp
(start,end)
a02_TextCNN/other_experiement/p8_TextCNN_predict_exp.py:77
↓ 1 callers
Function
get_mask
(batch_size,sequence_length)
a07_Transformer/a2_multi_head_attention.py:151
↓ 1 callers
Function
get_mask
(batch_size,sequence_length)
a07_Transformer/a2_encoder.py:91
↓ 1 callers
Function
get_mask
(sequence_length)
a07_Transformer/a2_decoder.py:94
↓ 1 callers
Method
get_mask
(self,sequence_length)
a07_Transformer/a2_transformer.py:136
↓ 1 callers
Function
get_target_label_short
(eval_y)
a00_Bert/utils.py:180
↓ 1 callers
Method
get_test_examples
Gets a collection of `InputExample`s for prediction.
a00_Bert/unused/run_classifier_multi_labels_bert.py:177
↓ 1 callers
Method
get_train_examples
Gets a collection of `InputExample`s for the train set.
a00_Bert/unused/run_classifier_multi_labels_bert.py:169
↓ 1 callers
Function
get_unique_labels
()
a06_Seq2seqWithAttention/a1_seq2seq_attention_model.py:249
↓ 1 callers
Function
get_unique_labels_batch
(batch_size,length=None)
a07_Transformer/a2_transformer.py:290
↓ 1 callers
Method
gru_backward_sentence_level
:param sentence_representation: [batch_size,num_sentences,hidden_size*2] :return:forward hidden state: a list,length is num_sentences
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:314
↓ 1 callers
Method
gru_backward_sentence_level
:param sentence_representation: [batch_size,num_sentences,hidden_size*2] :return:forward hidden state: a list,length is num_sentences
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:333
↓ 1 callers
Method
gru_backward_word_level
:param embedded_words:[batch_size*num_sentences,sentence_length,embed_size] :return: backward hidden state:a list.length is sentenc
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:273
↓ 1 callers
Method
gru_backward_word_level
:param embedded_words:[batch_size*num_sentences,sentence_length,embed_size] :return: backward hidden state:a list.length is sentenc
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:292
↓ 1 callers
Method
gru_forward_sentence_level
:param sentence_representation: [batch_size,num_sentences,hidden_size*2] :return:forward hidden state: a list,length is num_sentences
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:294
↓ 1 callers
Method
gru_forward_sentence_level
:param sentence_representation: [batch_size,num_sentences,hidden_size*2] :return:forward hidden state: a list,length is num_sentences
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:313
↓ 1 callers
Method
gru_forward_word_level
:param embedded_words:[batch_size*num_sentences,sentence_length,embed_size] :return:forward hidden state: a list.length is sentence_l
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:254
↓ 1 callers
Method
gru_forward_word_level
:param embedded_words:[batch_size*num_sentences,sentence_length,embed_size] :return:forward hidden state: a list.length is sentence_l
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:272
↓ 1 callers
Method
inference
main computation graph here: 1.Word Encoder. 2.Word Attention. 3.Sentence Encoder 4.Sentence Attention 5.linear classifier
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:133
↓ 1 callers
Method
inference
main computation graph here: 1.Word Encoder. 2.Word Attention. 3.Sentence Encoder 4.Sentence Attention 5.linear classifier
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:125
↓ 1 callers
Method
inference
main computation graph here: 1.Word Encoder. 2.Word Attention. 3.Sentence Encoder 4.Sentence Attention 5.dropout 6.transform for each task 7.linear cl
a05_HierarchicalAttentionNetwork/HAN_model.py:55
↓ 1 callers
Method
inference
main computation graph here: a.Input Module,b.Question Module,c.Episodic Memory Module,d.Answer Module
a09_DynamicMemoryNet/a8_dynamic_memory_network.py:74
↓ 1 callers
Method
inference
(self)
aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_model.py:209
↓ 1 callers
Method
inference
building blocks: encoder:6 layers.each layers has two sub-layers. the first is multi-head self-attention mechanism; the second is position
a07_Transformer/a2_transformer.py:72
↓ 1 callers
Method
inference
building blocks: encoder:6 layers.each layers has two sub-layers. the first is multi-head self-attention mechanism; the second is position
a07_Transformer/a2_transformer_classification.py:71
↓ 1 callers
Method
inference
main computation graph here: 1.embedding-->2.average-->3.linear classifier
a01_FastText/p6_fastTextB_model_multilabel.py:52
↓ 1 callers
Method
inference
main computation graph here: 1.embedding-->2.average-->3.linear classifier
a01_FastText/old_single_label/p5_fastTextB_model.py:47
↓ 1 callers
Method
inference
main computation graph here: 1. embeddding layers, 2.convolutional layer, 3.max-pooling, 4.softmax layer.
aa6_TwoCNNTextRelation/p9_twoCNNTextRelation_model.py:54
↓ 1 callers
Method
inference
main computation graph here: 1.embedding-->2.CONV-BN-RELU-MAX_POOLING-->3.linear classifier
a02_TextCNN/p7_TextCNN_model.py:64
↓ 1 callers
Method
inference
main computation graph here: 1.embedding-->2.CONV-RELU-MAX_POOLING-->3.linear classifier
a02_TextCNN/other_experiement/p7_TextCNN_model_multilayers.py:59
↓ 1 callers
Method
inference
main computation graph here: 1. embeddding layer, 2.Bi-LSTM layer, 3.mean pooling, 4.FC layer, 5.softmax
aa5_BiLstmTextRelation/p9_BiLstmTextRelation_model.py:54
↓ 1 callers
Method
inference
main computation graph here: 1. embeddding layer, 2.Bi-LSTM layer-->dropout,3.LSTM layer-->dropout 4.FC layer 6.softmax layer
a03_TextRNN/p8_TextRNN_model_multi_layers.py:49
↓ 1 callers
Method
inference
main computation graph here: 1. embeddding layer, 2.Bi-LSTM layer, 3.concat, 4.FC layer 5.softmax
a03_TextRNN/p8_TextRNN_model.py:49
↓ 1 callers
Method
inference
main computation graph here: 1.input encoder 2.dynamic emeory 3.output layer
a08_EntityNetwork/a3_entity_network.py:68
↓ 1 callers
Method
inference
main computation graph here: #1.Word embedding. 2.Encoder with GRU 3.Decoder using GRU(optional with attention).
a06_Seq2seqWithAttention/a1_seq2seq_attention_model.py:50
↓ 1 callers
Method
inference
main computation graph here: 1. embeddding layer, 2.Bi-LSTM layer, 3.max pooling, 4.FC layer 5.softmax
a04_TextRCNN/p71_TextRCNN_model.py:131
↓ 1 callers
Method
inference
main computation graph here: 1. embeddding layer, 2.Bi-LSTM layer, 3.max pooling, 4.FC layer 5.softmax
a04_TextRCNN/p71_TextRCNN_mode2.py:142
↓ 1 callers
Method
inference1
main computation graph here: 1.embedding-->2.average-->3.linear classifier
aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_model.py:82
↓ 1 callers
Method
inference2
main computation graph here: 1. embeddding layer, 2.Bi-LSTM layer, 3.max pooling, 4.FC layer 5.softmax
aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_model.py:191
↓ 1 callers
Function
init
()
a07_Transformer/a2_encoder.py:66
↓ 1 callers
Function
init
()
a07_Transformer/a2_decoder.py:100
↓ 1 callers
Method
input_encoder_bi_lstm
use bi-directional lstm to encode query_embedding:[batch_size,sequence_length,embed_size] and story_embeddin
a08_EntityNetwork/a3_entity_network.py:99
↓ 1 callers
Method
input_encoder_bow
(self)
a08_EntityNetwork/a3_entity_network.py:94
↓ 1 callers
Method
input_module
encode raw texts into vector representation
a09_DynamicMemoryNet/a8_dynamic_memory_network.py:86
↓ 1 callers
Method
instantiate_weights
define all weights here
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:334
↓ 1 callers
Method
instantiate_weights
define all weights here
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:369
↓ 1 callers
Method
instantiate_weights
define all weights here
a05_HierarchicalAttentionNetwork/HAN_model.py:179
↓ 1 callers
Method
instantiate_weights
define all weights here
a09_DynamicMemoryNet/a8_dynamic_memory_network.py:293
↓ 1 callers
Method
instantiate_weights
define all weights here
a07_Transformer/a2_transformer.py:128
↓ 1 callers
Method
instantiate_weights
define all weights here
a07_Transformer/a2_transformer_classification.py:124
↓ 1 callers
Method
instantiate_weights
define all weights here
a01_FastText/p6_fastTextB_model_multilabel.py:45
↓ 1 callers
Method
instantiate_weights
define all weights here
a01_FastText/old_single_label/p5_fastTextB_model.py:40
↓ 1 callers
Method
instantiate_weights
define all weights here
aa6_TwoCNNTextRelation/p9_twoCNNTextRelation_model.py:47
↓ 1 callers
Method
instantiate_weights
define all weights here
a02_TextCNN/p7_TextCNN_model.py:57
↓ 1 callers
Method
instantiate_weights
define all weights here
a02_TextCNN/other_experiement/p7_TextCNN_model_multilayers.py:52
↓ 1 callers
Method
instantiate_weights
define all weights here
aa5_BiLstmTextRelation/p9_BiLstmTextRelation_model.py:47
↓ 1 callers
Method
instantiate_weights
define all weights here
a03_TextRNN/p8_TextRNN_model_multi_layers.py:42
↓ 1 callers
Method
instantiate_weights
define all weights here
a03_TextRNN/p8_TextRNN_model.py:42
↓ 1 callers
Method
instantiate_weights
define all weights here
a08_EntityNetwork/a3_entity_network.py:255
↓ 1 callers
Method
instantiate_weights
define all weights here
a06_Seq2seqWithAttention/a1_seq2seq_attention_model.py:170
↓ 1 callers
Method
instantiate_weights
define all weights here
a04_TextRCNN/p71_TextRCNN_model.py:51
↓ 1 callers
Method
instantiate_weights
define all weights here
a04_TextRCNN/p71_TextRCNN_mode2.py:52
↓ 1 callers
Method
instantiate_weights_cnn
define all weights here
aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_model.py:59
↓ 1 callers
Method
instantiate_weights_rcnn
define all weights here
aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_model.py:66
↓ 1 callers
Function
layer_norm_and_dropout
Runs layer normalization followed by dropout.
a00_Bert/bert_modeling.py:380
↓ 1 callers
Method
layer_normalization
x should be:[batch_size,sequence_length,d_model] :return:[batch_size,sequence_length,d_model]
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:353
↓ 1 callers
Method
layer_normalization
x should be:[batch_size,sequence_length,d_model] :return:
a07_Transformer/a2_layer_norm_residual_conn.py:30
↓ 1 callers
Function
load_data
load data from h5py and pickle cache files, which is generate by take step by step of pre-processing.ipynb :param cache_file_h5py: :param
a01_FastText/p6_fastTextB_train_multilabel.py:197
↓ 1 callers
Function
load_data
load data from h5py and pickle cache files, which is generate by take step by step of pre-processing.ipynb :param cache_file_h5py: :param
a01_FastText/old_single_label/p5_fastTextB_train.py:159
↓ 1 callers
Function
load_data
load data from h5py and pickle cache files, which is generate by take step by step of pre-processing.ipynb :param cache_file_h5py: :param
a02_TextCNN/p7_TextCNN_train.py:222
↓ 1 callers
Function
load_data
load data from h5py and pickle cache files, which is generate by take step by step of pre-processing.ipynb :param cache_file_h5py: :param
a02_TextCNN/data_util.py:130
↓ 1 callers
Function
load_data_multilabel_new
input: a file path :return: train, test, valid. where train=(trainX, trainY). where trainX: is a list of list.each list repre
aa1_data_util/data_util_zhihu.py:117
↓ 1 callers
Function
load_data_multilabel_new
input: a file path :return: train, test, valid. where train=(trainX, trainY). where trainX: is a list of list.each list re
a08_EntityNetwork/data_util_zhihu.py:117
↓ 1 callers
Function
load_data_multilabel_new_twoCNN
input: a file path :return: train, test, valid. where train=(trainX, trainY). where trainX: is a list of list.each list repre
aa1_data_util/data_util_zhihu.py:201
↓ 1 callers
Function
load_data_predict
(vocabulary_word2index,vocabulary_word2index_label,questionid_question_lists,uni_to_tri_gram=False)
aa1_data_util/data_util_zhihu.py:416
↓ 1 callers
Function
load_data_predict
(vocabulary_word2index,vocabulary_word2index_label,questionid_question_lists,uni_to_tri_gram=False)
a08_EntityNetwork/data_util_zhihu.py:416
↓ 1 callers
Function
load_final_test_data
(file_path)
aa1_data_util/data_util_zhihu.py:405
↓ 1 callers
Function
load_final_test_data
(file_path)
a08_EntityNetwork/data_util_zhihu.py:405
↓ 1 callers
Function
load_vocab
Loads a vocabulary file into a dictionary.
a00_Bert/tokenization.py:70
↓ 1 callers
Function
loop_function
(prev, _)
a05_HierarchicalAttentionNetwork/p1_seq2seq.py:13
↓ 1 callers
Function
loop_function
(prev, _)
a06_Seq2seqWithAttention/a1_seq2seq.py:13
↓ 1 callers
Method
loss
(self, l2_lambda=0.0001)
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py:174
↓ 1 callers
Method
loss
(self, l2_lambda=0.0001)
a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py:192
↓ 1 callers
Method
loss
(self,l2_lambda=0.0001)
a05_HierarchicalAttentionNetwork/HAN_model.py:135
↓ 1 callers
Method
loss
(self, l2_lambda=0.0001)
a09_DynamicMemoryNet/a8_dynamic_memory_network.py:240
↓ 1 callers
Method
loss
(self,l2_lambda=0.0001)
aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_model.py:219
↓ 1 callers
Method
loss
(self, l2_lambda=0.0001)
a07_Transformer/a2_transformer_classification.py:95
↓ 1 callers
Method
loss
calculate loss using (NCE)cross entropy here
a01_FastText/p6_fastTextB_model_multilabel.py:65
↓ 1 callers
Method
loss
calculate loss using (NCE)cross entropy here
a01_FastText/old_single_label/p5_fastTextB_model.py:59
↓ 1 callers
Method
loss
(self,l2_lambda=0.0001)
aa6_TwoCNNTextRelation/p9_twoCNNTextRelation_model.py:113
↓ 1 callers
Method
loss
(self,l2_lambda=0.0001)
a02_TextCNN/p7_TextCNN_model.py:174
↓ 1 callers
Method
loss
(self,l2_lambda=0.0001)
a02_TextCNN/other_experiement/p7_TextCNN_model_multilayers.py:131
↓ 1 callers
Method
loss
(self,l2_lambda=0.0001)
aa5_BiLstmTextRelation/p9_BiLstmTextRelation_model.py:79
↓ 1 callers
Method
loss
(self,l2_lambda=0.0001)
a03_TextRNN/p8_TextRNN_model_multi_layers.py:83
← previous
next →
201–300 of 642, ranked by callers