SYMBOL INDEX (679 symbols across 83 files) FILE: a00_Bert/bert_modeling.py class BertConfig (line 30) | class BertConfig(object): method __init__ (line 33) | def __init__(self, method from_dict (line 82) | def from_dict(cls, json_object): method from_json_file (line 90) | def from_json_file(cls, json_file): method to_dict (line 96) | def to_dict(self): method to_json_string (line 101) | def to_json_string(self): class BertModel (line 106) | class BertModel(object): method __init__ (line 130) | def __init__(self, method get_pooled_output (line 246) | def get_pooled_output(self): method get_sequence_output (line 249) | def get_sequence_output(self): method get_all_encoder_layers (line 258) | def get_all_encoder_layers(self): method get_embedding_output (line 261) | def get_embedding_output(self): method get_embedding_table (line 272) | def get_embedding_table(self): function gelu (line 276) | def gelu(input_tensor): function get_activation (line 292) | def get_activation(activation_string): function get_assignment_map_from_checkpoint (line 329) | def get_assignment_map_from_checkpoint(tvars, init_checkpoint): function dropout (line 356) | def dropout(input_tensor, dropout_prob): function layer_norm (line 374) | def layer_norm(input_tensor, name=None): function layer_norm_and_dropout (line 380) | def layer_norm_and_dropout(input_tensor, dropout_prob, name=None): function create_initializer (line 387) | def create_initializer(initializer_range=0.02): function embedding_lookup (line 392) | def embedding_lookup(input_ids, function embedding_postprocessor (line 441) | def embedding_postprocessor(input_tensor, function create_attention_mask_from_input_mask (line 544) | def create_attention_mask_from_input_mask(from_tensor, to_mask): function attention_layer (line 578) | def attention_layer(from_tensor, function transformer_model (line 774) | def transformer_model(input_tensor, function get_shape_list (line 915) | def get_shape_list(tensor, expected_rank=None, name=None): function reshape_to_matrix (line 952) | def reshape_to_matrix(input_tensor): function reshape_from_matrix (line 966) | def reshape_from_matrix(output_tensor, orig_shape_list): function assert_rank (line 979) | def assert_rank(tensor, expected_rank, name=None): FILE: a00_Bert/optimization.py function create_optimizer (line 25) | def create_optimizer(loss, init_lr, num_train_steps, num_warmup_steps, u... class AdamWeightDecayOptimizer (line 84) | class AdamWeightDecayOptimizer(tf.train.Optimizer): method __init__ (line 87) | def __init__(self, method apply_gradients (line 105) | def apply_gradients(self, grads_and_vars, global_step=None, name=None): method _do_use_weight_decay (line 156) | def _do_use_weight_decay(self, param_name): method _get_variable_name (line 166) | def _get_variable_name(self, param_name): FILE: a00_Bert/run_classifier_predict_online.py class InputExample (line 56) | class InputExample(object): method __init__ (line 59) | def __init__(self, guid, text_a, text_b=None, label=None): class InputFeatures (line 76) | class InputFeatures(object): method __init__ (line 79) | def __init__(self, input_ids, input_mask, segment_ids, label_id): class DataProcessor (line 86) | class DataProcessor(object): method get_train_examples (line 89) | def get_train_examples(self, data_dir): method get_dev_examples (line 93) | def get_dev_examples(self, data_dir): method get_test_examples (line 97) | def get_test_examples(self, data_dir): method get_labels (line 101) | def get_labels(self): method _read_tsv (line 106) | def _read_tsv(cls, input_file, quotechar=None): class SentencePairClassificationProcessor (line 115) | class SentencePairClassificationProcessor(DataProcessor): method __init__ (line 117) | def __init__(self): method get_labels (line 135) | def get_labels(self): function convert_single_example (line 153) | def convert_single_example(ex_index, example, label_list, max_seq_length... function _truncate_seq_pair (line 243) | def _truncate_seq_pair(tokens_a, tokens_b, max_length): function create_int_feature (line 259) | def create_int_feature(values): function create_model (line 263) | def create_model(bert_config, is_training, input_ids, input_mask, segmen... function main (line 322) | def main(_): function predict_online (line 354) | def predict_online(line): FILE: a00_Bert/tokenization.py function convert_to_unicode (line 27) | def convert_to_unicode(text): function printable_text (line 47) | def printable_text(text): function load_vocab (line 70) | def load_vocab(vocab_file): function convert_by_vocab (line 85) | def convert_by_vocab(vocab, items): function convert_tokens_to_ids (line 93) | def convert_tokens_to_ids(vocab, tokens): function convert_ids_to_tokens (line 97) | def convert_ids_to_tokens(inv_vocab, ids): function whitespace_tokenize (line 101) | def whitespace_tokenize(text): class FullTokenizer (line 110) | class FullTokenizer(object): method __init__ (line 113) | def __init__(self, vocab_file, do_lower_case=True): method tokenize (line 119) | def tokenize(self, text): method convert_tokens_to_ids (line 127) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 130) | def convert_ids_to_tokens(self, ids): class BasicTokenizer (line 134) | class BasicTokenizer(object): method __init__ (line 137) | def __init__(self, do_lower_case=True): method tokenize (line 145) | def tokenize(self, text): method _run_strip_accents (line 169) | def _run_strip_accents(self, text): method _run_split_on_punc (line 180) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 200) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 213) | def _is_chinese_char(self, cp): method _clean_text (line 235) | def _clean_text(self, text): class WordpieceTokenizer (line 249) | class WordpieceTokenizer(object): method __init__ (line 252) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 257) | def tokenize(self, text): function _is_whitespace (line 311) | def _is_whitespace(char): function _is_control (line 323) | def _is_control(char): function _is_punctuation (line 335) | def _is_punctuation(char): FILE: a00_Bert/train_bert_multi-label.py function main (line 35) | def main(_): function create_model (line 103) | def create_model(bert_config, is_training, input_ids, input_mask, segmen... function do_eval (line 143) | def do_eval(sess,input_ids,input_mask,segment_ids,label_ids,is_training,... function get_input_mask_segment_ids (line 175) | def get_input_mask_segment_ids(train_x_batch,cls_id): FILE: a00_Bert/train_bert_toy_task.py function bert_train_fn (line 15) | def bert_train_fn(): function bert_predict_fn (line 49) | def bert_predict_fn(): function create_model (line 53) | def create_model(bert_config, is_training, input_ids, input_mask, segmen... FILE: a00_Bert/unused/run_classifier_multi_labels_bert.py class InputExample (line 135) | class InputExample(object): method __init__ (line 138) | def __init__(self, guid, text_a, text_b=None, label=None): class InputFeatures (line 156) | class InputFeatures(object): method __init__ (line 159) | def __init__(self, input_ids, input_mask, segment_ids, label_id): class DataProcessor (line 166) | class DataProcessor(object): method get_train_examples (line 169) | def get_train_examples(self, data_dir): method get_dev_examples (line 173) | def get_dev_examples(self, data_dir): method get_test_examples (line 177) | def get_test_examples(self, data_dir): method get_labels (line 181) | def get_labels(self): method _read_tsv (line 186) | def _read_tsv(cls, input_file, quotechar=None): class XnliProcessor (line 196) | class XnliProcessor(DataProcessor): method __init__ (line 199) | def __init__(self): method get_train_examples (line 202) | def get_train_examples(self, data_dir): method get_dev_examples (line 221) | def get_dev_examples(self, data_dir): method get_labels (line 239) | def get_labels(self): class MnliProcessor (line 244) | class MnliProcessor(DataProcessor): method get_train_examples (line 247) | def get_train_examples(self, data_dir): method get_dev_examples (line 252) | def get_dev_examples(self, data_dir): method get_test_examples (line 258) | def get_test_examples(self, data_dir): method get_labels (line 263) | def get_labels(self): method _create_examples (line 267) | def _create_examples(self, lines, set_type): class MrpcProcessor (line 285) | class MrpcProcessor(DataProcessor): method get_train_examples (line 288) | def get_train_examples(self, data_dir): method get_dev_examples (line 293) | def get_dev_examples(self, data_dir): method get_test_examples (line 298) | def get_test_examples(self, data_dir): method get_labels (line 303) | def get_labels(self): method _create_examples (line 307) | def _create_examples(self, lines, set_type): class ColaProcessor (line 325) | class ColaProcessor(DataProcessor): method get_train_examples (line 328) | def get_train_examples(self, data_dir): method get_dev_examples (line 333) | def get_dev_examples(self, data_dir): method get_test_examples (line 338) | def get_test_examples(self, data_dir): method get_labels (line 343) | def get_labels(self): method _create_examples (line 347) | def _create_examples(self, lines, set_type): class SentimentAnalysisFineGrainProcessor (line 365) | class SentimentAnalysisFineGrainProcessor(DataProcessor): method get_train_examples (line 368) | def get_train_examples(self, data_dir): method get_dev_examples (line 373) | def get_dev_examples(self, data_dir): method get_test_examples (line 378) | def get_test_examples(self, data_dir): method get_labels (line 383) | def get_labels(self): method _create_examples (line 393) | def _create_examples(self, lines, set_type): class SentencePairClassificationProcessor (line 414) | class SentencePairClassificationProcessor(DataProcessor): method __init__ (line 416) | def __init__(self): method get_train_examples (line 419) | def get_train_examples(self, data_dir): method get_dev_examples (line 424) | def get_dev_examples(self, data_dir): method get_test_examples (line 429) | def get_test_examples(self, data_dir): method get_labels (line 434) | def get_labels(self): method _create_examples (line 438) | def _create_examples(self, lines, set_type): function convert_single_example (line 452) | def convert_single_example(ex_index, example, label_list, max_seq_length, function file_based_convert_examples_to_features (line 558) | def file_based_convert_examples_to_features( function file_based_input_fn_builder (line 591) | def file_based_input_fn_builder(input_file, seq_length, is_training, function _truncate_seq_pair (line 638) | def _truncate_seq_pair(tokens_a, tokens_b, max_length): function create_model_original (line 655) | def create_model_original(bert_config, is_training, input_ids, input_mas... function create_model (line 699) | def create_model(bert_config, is_training, input_ids, input_mask, segmen... function model_fn_builder (line 754) | def model_fn_builder(bert_config, num_labels, init_checkpoint, learning_... function input_fn_builder (line 851) | def input_fn_builder(features, seq_length, is_training, drop_remainder): function convert_examples_to_features (line 905) | def convert_examples_to_features(examples, label_list, max_seq_length, function main (line 921) | def main(_): FILE: a00_Bert/unused/train_bert_multi-label_old.py function main (line 35) | def main(_): function create_model (line 104) | def create_model(bert_config, is_training, input_ids, input_mask, segmen... function do_eval (line 135) | def do_eval(sess,input_ids,input_mask,segment_ids,label_ids,is_training,... function get_input_mask_segment_ids (line 175) | def get_input_mask_segment_ids(train_x_batch,cls_id): FILE: a00_Bert/utils.py function load_data (line 11) | def load_data(cache_file_h5py,cache_file_pickle): function compute_f1_score (line 43) | def compute_f1_score(predict_y,eval_y): function compute_f1_score_removed (line 55) | def compute_f1_score_removed(label_list_top5,eval_y): function compute_confuse_matrix (line 76) | def compute_confuse_matrix(target_y,predict_y,label_dict,name='default'): function compute_micro_macro (line 104) | def compute_micro_macro(label_dict): function compute_TF_FP_FN_micro (line 114) | def compute_TF_FP_FN_micro(label_dict): function compute_f1_micro_use_TFFPFN (line 127) | def compute_f1_micro_use_TFFPFN(label_dict): function compute_f1_macro_use_TFFPFN (line 137) | def compute_f1_macro_use_TFFPFN(label_dict): function compute_f1 (line 154) | def compute_f1(TP,FP,FN,compute_type): function init_label_dict (line 169) | def init_label_dict(num_classes): function get_target_label_short (line 180) | def get_target_label_short(eval_y): function get_target_label_short_batch (line 187) | def get_target_label_short_batch(eval_y_big): # tested. function get_label_using_prob (line 207) | def get_label_using_prob(prob,top_number=5): function get_label_using_logits_batch (line 213) | def get_label_using_logits_batch(prob,top_number=5): # tested. function calculate_accuracy (line 222) | def calculate_accuracy(labels_predicted, labels,eval_counter): function compute_confuse_matrix_batch (line 239) | def compute_confuse_matrix_batch(y_targetlabel_list,y_logits_array,label... FILE: a00_boosting/a08_boosting.py function compute_labels_weights (line 14) | def compute_labels_weights(weights_label,logits,labels): function get_weights_for_current_batch (line 42) | def get_weights_for_current_batch(answer_list,weights_dict): function loss (line 59) | def loss(logits,labels,weights): function get_weights_label_as_standard_dict (line 65) | def get_weights_label_as_standard_dict(weights_label): FILE: a01_FastText/old_single_label/p5_fastTextB_model.py class fastTextB (line 7) | class fastTextB: method __init__ (line 8) | def __init__(self, label_size, learning_rate, batch_size, decay_steps,... method instantiate_weights (line 40) | def instantiate_weights(self): method inference (line 47) | def inference(self): method loss (line 59) | def loss(self,l2_lambda=0.01): #0.0001-->0.001 method train (line 86) | def train(self): function test (line 93) | def test(): FILE: a01_FastText/old_single_label/p5_fastTextB_predict.py function main (line 37) | def main(_): function get_label_using_logits (line 84) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function write_question_id_with_labels (line 96) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a01_FastText/old_single_label/p5_fastTextB_train.py function main (line 34) | def main(_): function assign_pretrained_word_embedding (line 118) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 150) | def do_eval(sess,fast_text,evalX,evalY,batch_size): function load_data (line 159) | def load_data(cache_file_h5py,cache_file_pickle): FILE: a01_FastText/p5_fastTextB_predict_multilabel.py function main (line 33) | def main(_): function get_label_using_logits (line 83) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function write_question_id_with_labels (line 93) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a01_FastText/p6_fastTextB_model_multilabel.py class fastTextB (line 6) | class fastTextB: method __init__ (line 7) | def __init__(self, label_size, learning_rate, batch_size, decay_steps,... method instantiate_weights (line 45) | def instantiate_weights(self): method inference (line 52) | def inference(self): method loss (line 65) | def loss(self,l2_lambda=0.0001): method train (line 95) | def train(self): FILE: a01_FastText/p6_fastTextB_train_multilabel.py function main (line 39) | def main(_): function do_eval (line 124) | def do_eval(sess,fast_text,evalX,evalY,batch_size,vocabulary_index2word_... function assign_pretrained_word_embedding (line 142) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function get_label_using_logits (line 176) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 186) | def calculate_accuracy(labels_predicted, labels,eval_counter): function load_data (line 197) | def load_data(cache_file_h5py,cache_file_pickle): function process_labels (line 228) | def process_labels(trainY_batch,require_size=5,number=None): function proces_label_to_algin (line 253) | def proces_label_to_algin(ys_list,require_size=5): FILE: a02_TextCNN/data_util.py function load_data_multilabel (line 16) | def load_data_multilabel(traning_data_path,vocab_word2index, vocab_label... function transform_multilabel_as_multihot (line 52) | def transform_multilabel_as_multihot(label_list,label_size): function create_vocabulary (line 65) | def create_vocabulary(training_data_path,vocab_size,name_scope='cnn'): function load_data (line 130) | def load_data(cache_file_h5py,cache_file_pickle): FILE: a02_TextCNN/other_experiement/data_util_zhihu.py function create_voabulary (line 15) | def create_voabulary(simple=None,word2vec_model_path='zhihu-word2vec-tit... function create_voabulary_label (line 47) | def create_voabulary_label(voabulary_label='train-zhihu4-only-title-all.... function sort_by_value (line 97) | def sort_by_value(d): function create_voabulary_labelO (line 103) | def create_voabulary_labelO(): function load_data_multilabel_new (line 119) | def load_data_multilabel_new(vocabulary_word2index,vocabulary_word2index... function load_data_multilabel_new_twoCNN (line 203) | def load_data_multilabel_new_twoCNN(vocabulary_word2index,vocabulary_wor... function load_data (line 265) | def load_data(vocabulary_word2index,vocabulary_word2index_label,valid_po... function process_one_sentence_to_get_ui_bi_tri_gram (line 306) | def process_one_sentence_to_get_ui_bi_tri_gram(sentence,n_gram=3): function load_data_with_multilabels (line 336) | def load_data_with_multilabels(vocabulary_word2index,vocabulary_word2ind... function transform_multilabel_as_multihot (line 388) | def transform_multilabel_as_multihot(label_list,label_size=1999): #1999l... function transform_multilabel_as_multihotO (line 400) | def transform_multilabel_as_multihotO(label_list,label_size=1999): #1999... function load_final_test_data (line 407) | def load_final_test_data(file_path): function load_data_predict (line 418) | def load_data_predict(vocabulary_word2index,vocabulary_word2index_label,... function proces_label_to_algin (line 436) | def proces_label_to_algin(ys_list,require_size=5): function write_uigram_to_trigram (line 455) | def write_uigram_to_trigram(): function test_pad (line 461) | def test_pad(): function read_topic_info (line 468) | def read_topic_info(): function stat_training_data_length (line 485) | def stat_training_data_length(): FILE: a02_TextCNN/other_experiement/p7_TextCNN_model_multilayers.py class TextCNNMultilayers (line 7) | class TextCNNMultilayers: method __init__ (line 8) | def __init__(self, filter_sizes,num_filters,num_classes, learning_rate... method instantiate_weights (line 52) | def instantiate_weights(self): method inference (line 59) | def inference(self): method loss_multilabel (line 116) | def loss_multilabel(self,l2_lambda=0.0001): #0.0001#this loss function... method loss (line 131) | def loss(self,l2_lambda=0.0001):#0.001 method train_old (line 142) | def train_old(self): function test (line 152) | def test(): function get_label_y (line 180) | def get_label_y(input_x): function compute_single_label (line 189) | def compute_single_label(listt): FILE: a02_TextCNN/other_experiement/p7_TextCNN_predict_ensemble.py function main (line 4) | def main(_): FILE: a02_TextCNN/other_experiement/p7_TextCNN_predict_exp.py function get_logits_with_value_by_input_exp (line 81) | def get_logits_with_value_by_input_exp(start,end): function main (line 91) | def main(_): function get_label_using_logits (line 136) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 146) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 158) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a02_TextCNN/other_experiement/p7_TextCNN_predict_exp512.py function main (line 40) | def main(_): function get_label_using_logits (line 85) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 95) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 107) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a02_TextCNN/other_experiement/p7_TextCNN_predict_exp512_0609.py function main (line 40) | def main(_): function get_label_using_logits (line 85) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 95) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 107) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a02_TextCNN/other_experiement/p7_TextCNN_predict_exp512_simple.py function main (line 40) | def main(_): function get_label_using_logits (line 85) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 95) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 107) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a02_TextCNN/other_experiement/p7_TextCNN_train_exp.py function main (line 40) | def main(_): function assign_pretrained_word_embedding (line 120) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 153) | def do_eval(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_la... function get_label_using_logits (line 169) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 180) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: a02_TextCNN/other_experiement/p7_TextCNN_train_exp512.py function main (line 40) | def main(_): function assign_pretrained_word_embedding (line 123) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 156) | def do_eval(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_la... function get_label_using_logits (line 172) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 183) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: a02_TextCNN/other_experiement/p7_TextCNN_train_exp_512_0609.py function main (line 43) | def main(_): function assign_pretrained_word_embedding (line 138) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 171) | def do_eval(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_la... function get_label_using_logits (line 187) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 198) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: a02_TextCNN/other_experiement/p8_TextCNN_predict_exp.py function get_logits_by_input_exp (line 77) | def get_logits_by_input_exp(start,end): function main (line 85) | def main(_): function get_label_using_logits (line 130) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 140) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 152) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a02_TextCNN/p7_TextCNN_model.py class TextCNN (line 7) | class TextCNN: method __init__ (line 8) | def __init__(self, filter_sizes,num_filters,num_classes, learning_rate... method instantiate_weights (line 57) | def instantiate_weights(self): method inference (line 64) | def inference(self): method cnn_single_layer (line 83) | def cnn_single_layer(self): method cnn_multiple_layers (line 120) | def cnn_multiple_layers(self): method loss_multilabel (line 159) | def loss_multilabel(self,l2_lambda=0.0001): #0.0001#this loss function... method loss (line 174) | def loss(self,l2_lambda=0.0001):#0.001 method train_old (line 185) | def train_old(self): method train (line 191) | def train(self): function test (line 206) | def test(): function get_label_y (line 235) | def get_label_y(input_x): function compute_single_label (line 244) | def compute_single_label(listt): FILE: a02_TextCNN/p7_TextCNN_predict.py function get_logits_with_value_by_input (line 84) | def get_logits_with_value_by_input(start,end): function main (line 94) | def main(_): function get_label_using_logits (line 139) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 149) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 161) | def write_question_id_with_labels(question_id,labels_list,f): function load_data (line 165) | def load_data(cache_file_h5py,cache_file_pickle): FILE: a02_TextCNN/p7_TextCNN_train.py function main (line 46) | def main(_): function do_eval (line 131) | def do_eval(sess, textCNN, evalX, evalY, num_classes): function fastF1 (line 159) | def fastF1(result: list, predict: list, num_classes: int): function assign_pretrained_word_embedding (line 190) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function load_data (line 222) | def load_data(cache_file_h5py,cache_file_pickle): FILE: a02_TextCNN/p7_temp.py function read_write (line 3) | def read_write(source_file_path,target_file_path): FILE: a03_TextRNN/p8_TextRNN_model.py class TextRNN (line 7) | class TextRNN: method __init__ (line 8) | def __init__(self,num_classes, learning_rate, batch_size, decay_steps,... method instantiate_weights (line 42) | def instantiate_weights(self): method inference (line 49) | def inference(self): method loss (line 75) | def loss(self,l2_lambda=0.0001): method loss_nce (line 86) | def loss_nce(self,l2_lambda=0.0001): #0.0001-->0.001 method train (line 105) | def train(self): function test (line 112) | def test(): FILE: a03_TextRNN/p8_TextRNN_model_multi_layers.py class TextRNN (line 7) | class TextRNN: method __init__ (line 8) | def __init__(self,num_classes, learning_rate, batch_size, decay_steps,... method instantiate_weights (line 42) | def instantiate_weights(self): method inference (line 49) | def inference(self): method loss (line 83) | def loss(self,l2_lambda=0.0001): method loss_nce (line 94) | def loss_nce(self,l2_lambda=0.0001): #0.0001-->0.001 method train (line 113) | def train(self): function test (line 120) | def test(): FILE: a03_TextRNN/p8_TextRNN_predict.py function main (line 32) | def main(_): function get_label_using_logits (line 83) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_batch (line 96) | def get_label_using_logits_batch(question_id_sublist,logits_batch,vocabu... function write_question_id_with_labels (line 110) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a03_TextRNN/p8_TextRNN_train.py function main (line 33) | def main(_): function assign_pretrained_word_embedding (line 108) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 141) | def do_eval(sess,textRNN,evalX,evalY,batch_size,vocabulary_index2word_la... function get_label_using_logits (line 154) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 165) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: a04_TextRCNN/p71_TextRCNN_mode2.py class TextRCNN (line 6) | class TextRCNN: method __init__ (line 7) | def __init__(self,num_classes, learning_rate, decay_steps, decay_rate,... method instantiate_weights (line 52) | def instantiate_weights(self): method get_context_left (line 74) | def get_context_left(self,context_left,embedding_previous): method get_context_right (line 87) | def get_context_right(self,context_right,embedding_afterward): method conv_layer_with_recurrent_structure (line 100) | def conv_layer_with_recurrent_structure(self): method inference (line 142) | def inference(self): method loss (line 162) | def loss(self,l2_lambda=0.0001):#0.001 method loss_multilabel (line 173) | def loss_multilabel(self,l2_lambda=0.00001): #0.0001#this loss functio... method train (line 188) | def train(self): function test (line 195) | def test(): FILE: a04_TextRCNN/p71_TextRCNN_model.py class TextRCNN (line 6) | class TextRCNN: method __init__ (line 7) | def __init__(self,num_classes, learning_rate, batch_size, decay_steps,... method instantiate_weights (line 51) | def instantiate_weights(self): method get_context_left (line 66) | def get_context_left(self,context_left,embedding_previous): method get_context_right (line 78) | def get_context_right(self,context_right,embedding_afterward): method conv_layer_with_recurrent_structure (line 90) | def conv_layer_with_recurrent_structure(self): method inference (line 131) | def inference(self): method loss (line 149) | def loss(self,l2_lambda=0.0001):#0.001 method loss_multilabel (line 160) | def loss_multilabel(self,l2_lambda=0.00001): #0.0001#this loss functio... method train (line 175) | def train(self): function test (line 182) | def test(): FILE: a04_TextRCNN/p71_TextRCNN_predict.py function main (line 35) | def main(_): function get_label_using_logits (line 84) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 94) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 106) | def write_question_id_with_labels(question_id,labels_list,f): function get_label_using_logits_batch (line 111) | def get_label_using_logits_batch(question_id_sublist,logits_batch,vocabu... function write_question_id_with_labels (line 125) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a04_TextRCNN/p71_TextRCNN_train.py function main (line 36) | def main(_): function assign_pretrained_word_embedding (line 116) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 149) | def do_eval(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_la... function get_label_using_logits (line 165) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 176) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: a05_HierarchicalAttentionNetwork/HAN_model.py class HierarchicalAttention (line 8) | class HierarchicalAttention: method __init__ (line 9) | def __init__(self, accusation_num_classes,article_num_classes, deathp... method inference (line 55) | def inference(self): method attention (line 101) | def attention(self,input_sequences,attention_level,reuse_flag=False): method bi_lstm (line 119) | def bi_lstm(self, input_sequences, level,num_units, reuse_flag=False): method loss (line 135) | def loss(self,l2_lambda=0.0001): method train (line 169) | def train(self): method instantiate_weights (line 179) | def instantiate_weights(self): function test (line 186) | def test(): FILE: a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model.py class HierarchicalAttention (line 7) | class HierarchicalAttention: method __init__ (line 8) | def __init__(self, num_classes, learning_rate, batch_size, decay_steps... method attention_word_level (line 65) | def attention_word_level(self, hidden_state): method attention_sentence_level (line 101) | def attention_sentence_level(self, hidden_state_sentence): method inference (line 133) | def inference(self): method loss (line 174) | def loss(self, l2_lambda=0.0001): # 0.001 method loss_multilabel (line 187) | def loss_multilabel(self, l2_lambda=0.00001*10): #*3#0.00001 #TODO 0.0... method train (line 203) | def train(self): method gru_single_step_word_level (line 213) | def gru_single_step_word_level(self, Xt, h_t_minus_1): method gru_single_step_sentence_level (line 232) | def gru_single_step_sentence_level(self, Xt, method gru_forward_word_level (line 254) | def gru_forward_word_level(self, embedded_words): method gru_backward_word_level (line 273) | def gru_backward_word_level(self, embedded_words): method gru_forward_sentence_level (line 294) | def gru_forward_sentence_level(self, sentence_representation): method gru_backward_sentence_level (line 314) | def gru_backward_sentence_level(self, sentence_representation): method instantiate_weights (line 334) | def instantiate_weights(self): function test (line 393) | def test(): FILE: a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_model_transformer.py class HierarchicalAttention (line 8) | class HierarchicalAttention: method __init__ (line 9) | def __init__(self, num_classes, learning_rate, batch_size, decay_steps... method attention_word_level (line 66) | def attention_word_level(self, hidden_state): method attention_sentence_level (line 93) | def attention_sentence_level(self, hidden_state_sentence): method inference (line 125) | def inference(self): method loss (line 192) | def loss(self, l2_lambda=0.0001): # 0.001 method loss_multilabel (line 205) | def loss_multilabel(self, l2_lambda=0.00001*10): #*3#0.00001 #TODO 0.0... method train (line 221) | def train(self): method gru_single_step_word_level (line 231) | def gru_single_step_word_level(self, Xt, h_t_minus_1): method gru_single_step_sentence_level (line 250) | def gru_single_step_sentence_level(self, Xt, method gru_forward_word_level (line 272) | def gru_forward_word_level(self, embedded_words): method gru_backward_word_level (line 292) | def gru_backward_word_level(self, embedded_words): method gru_forward_sentence_level (line 313) | def gru_forward_sentence_level(self, sentence_representation): method gru_backward_sentence_level (line 333) | def gru_backward_sentence_level(self, sentence_representation): method layer_normalization (line 353) | def layer_normalization(self,x,scope): method instantiate_weights (line 369) | def instantiate_weights(self): function test (line 429) | def test(): function get_input_y (line 461) | def get_input_y(i,input_x,batch_size): FILE: a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_predict.py function main (line 43) | def main(_): function get_label_using_logits (line 93) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 103) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 115) | def write_question_id_with_labels(question_id,labels_list,f): function get_label_using_logits_batch (line 120) | def get_label_using_logits_batch(question_id_sublist,logits_batch,vocabu... function write_question_id_with_labels (line 134) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a05_HierarchicalAttentionNetwork/p1_HierarchicalAttention_train.py function main (line 42) | def main(_): function assign_pretrained_word_embedding (line 149) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 182) | def do_eval(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_la... function get_label_using_logits (line 198) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 209) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: a05_HierarchicalAttentionNetwork/p1_seq2seq.py function extract_argmax_and_embed (line 5) | def extract_argmax_and_embed(embedding, output_projection=None): function rnn_decoder_with_attention (line 23) | def rnn_decoder_with_attention(decoder_inputs, initial_state, cell, loop... FILE: a06_Seq2seqWithAttention/a1_seq2seq.py function extract_argmax_and_embed (line 5) | def extract_argmax_and_embed(embedding, output_projection=None): function rnn_decoder_with_attention (line 23) | def rnn_decoder_with_attention(decoder_inputs, initial_state, cell, loop... FILE: a06_Seq2seqWithAttention/a1_seq2seq_attention_model.py class seq2seq_attention_model (line 10) | class seq2seq_attention_model: method __init__ (line 11) | def __init__(self, num_classes, learning_rate, batch_size, decay_steps... method inference (line 50) | def inference(self): method loss_seq2seq (line 95) | def loss_seq2seq(self): method train (line 106) | def train(self): method gru_cell (line 115) | def gru_cell(self, Xt, h_t_minus_1): method gru_cell_decoder (line 132) | def gru_cell_decoder(self, Xt, h_t_minus_1,context_vector): method gru_forward (line 151) | def gru_forward(self, embedded_words,gru_cell, reverse=False): method instantiate_weights (line 170) | def instantiate_weights(self): function test (line 217) | def test(): function get_unique_labels (line 249) | def get_unique_labels(): FILE: a06_Seq2seqWithAttention/a1_seq2seq_attention_predict.py function main (line 50) | def main(_): function get_label_using_logits (line 96) | def get_label_using_logits(logits, predictions,vocabulary_index2word_lab... function process_each_row_get_lable (line 106) | def process_each_row_get_lable(row,vocabulary_index2word_label,vocabular... function get_label_using_logitsO (line 125) | def get_label_using_logitsO(pred_list, vocabulary_index2word_label,vocab... function write_question_id_with_labels (line 138) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a06_Seq2seqWithAttention/a1_seq2seq_attention_train.py function main (line 41) | def main(_): function assign_pretrained_word_embedding (line 142) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 175) | def do_eval(sess,model,evalX,evalY,batch_size,vocabulary_index2word_labe... function get_label_using_logits (line 196) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 207) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: a07_Transformer/a2_attention_between_enc_dec.py class AttentionEncoderDecoder (line 13) | class AttentionEncoderDecoder(BaseClass): method __init__ (line 14) | def __init__(self,d_model, d_k, d_v, sequence_length, h, batch_size,Q,... method attention_encoder_decoder_fn (line 35) | def attention_encoder_decoder_fn(self): function test (line 41) | def test(): FILE: a07_Transformer/a2_base_model.py class BaseClass (line 6) | class BaseClass(object): method __init__ (line 10) | def __init__(self,d_model,d_k,d_v,sequence_length,h,batch_size,num_lay... method sub_layer_postion_wise_feed_forward (line 30) | def sub_layer_postion_wise_feed_forward(self ,x ,layer_index,type) :#... method sub_layer_multi_head_attention (line 42) | def sub_layer_multi_head_attention(self ,layer_index ,Q ,K_s,type,mask... method sub_layer_layer_norm_residual_connection (line 65) | def sub_layer_layer_norm_residual_connection(self,layer_input ,layer_o... FILE: a07_Transformer/a2_decoder.py class Decoder (line 18) | class Decoder(BaseClass): method __init__ (line 19) | def __init__(self,d_model,d_k,d_v,sequence_length,h,batch_size,Q,K_s,K... method decoder_fn (line 43) | def decoder_fn(self): method decoder_single_layer (line 54) | def decoder_single_layer(self,Q,K_s,layer_index): function get_mask (line 94) | def get_mask(sequence_length): function init (line 100) | def init(): function test_decoder_single_layer (line 130) | def test_decoder_single_layer(): function test_decoder (line 137) | def test_decoder(): FILE: a07_Transformer/a2_encoder.py class Encoder (line 13) | class Encoder(BaseClass): method __init__ (line 14) | def __init__(self,d_model,d_k,d_v,sequence_length,h,batch_size,num_lay... method encoder_fn (line 33) | def encoder_fn(self): method encoder_single_layer (line 45) | def encoder_single_layer(self,Q,K_s,layer_index): function init (line 66) | def init(): function get_mask (line 91) | def get_mask(batch_size,sequence_length): function test_sub_layer_multi_head_attention (line 97) | def test_sub_layer_multi_head_attention(encoder_class,index_layer,Q,K_s): function test_postion_wise_feed_forward (line 101) | def test_postion_wise_feed_forward(encoder_class,x,layer_index): FILE: a07_Transformer/a2_layer_norm_residual_conn.py class LayerNormResidualConnection (line 6) | class LayerNormResidualConnection(object): method __init__ (line 7) | def __init__(self,x,y,layer_index,type,residual_dropout=0.1,use_residu... method layer_norm_residual_connection (line 16) | def layer_norm_residual_connection(self): method residual_connection (line 25) | def residual_connection(self): method layer_normalization (line 30) | def layer_normalization(self,x): function test (line 48) | def test(): FILE: a07_Transformer/a2_multi_head_attention.py class MultiHeadAttention (line 17) | class MultiHeadAttention(object): method __init__ (line 19) | def __init__(self,Q,K_s,V_s,d_model,d_k,d_v,sequence_length,h,type=Non... method multi_head_attention_fn (line 34) | def multi_head_attention_fn(self): method scaled_dot_product_attention_batch_mine (line 58) | def scaled_dot_product_attention_batch_mine(self,Q,K_s,V_s): #my own i... method scaled_dot_product_attention_batch (line 86) | def scaled_dot_product_attention_batch(self, Q, K_s, V_s):# scaled dot... function multi_head_attention_for_sentence_vectorized (line 119) | def multi_head_attention_for_sentence_vectorized(layer_number): function get_mask (line 151) | def get_mask(batch_size,sequence_length): FILE: a07_Transformer/a2_poistion_wise_feed_forward.py class PositionWiseFeedFoward (line 16) | class PositionWiseFeedFoward(object): #TODO make it parallel method __init__ (line 21) | def __init__(self,x,layer_index,d_model=512,d_ff=2048): method position_wise_feed_forward_fn (line 35) | def position_wise_feed_forward_fn(self): function test_position_wise_feed_forward_fn (line 62) | def test_position_wise_feed_forward_fn(): function test (line 72) | def test(): FILE: a07_Transformer/a2_predict.py function main (line 47) | def main(_): function get_label_using_logits (line 112) | def get_label_using_logits(logits, predictions,vocabulary_index2word_lab... function process_each_row_get_lable (line 122) | def process_each_row_get_lable(row,vocabulary_index2word_label,vocabular... function write_question_id_with_labels (line 142) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a07_Transformer/a2_predict_classification.py function main (line 44) | def main(_): function get_label_using_logits_batch (line 98) | def get_label_using_logits_batch(question_id_sublist, logits_batch, voca... function get_label_using_logits (line 115) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function process_each_row_get_lable (line 124) | def process_each_row_get_lable(row,vocabulary_index2word_label,vocabular... function write_question_id_with_labels (line 144) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a07_Transformer/a2_train.py function main (line 46) | def main(_): function assign_pretrained_word_embedding (line 147) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 180) | def do_eval(sess,model,evalX,evalY,batch_size,vocabulary_index2word_labe... FILE: a07_Transformer/a2_train_classification.py function main (line 45) | def main(_): function assign_pretrained_word_embedding (line 140) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 173) | def do_eval(sess,model,evalX,evalY,batch_size,vocabulary_index2word_labe... FILE: a07_Transformer/a2_transformer.py class Transformer (line 33) | class Transformer(BaseClass): method __init__ (line 34) | def __init__(self, num_classes, learning_rate, batch_size, decay_steps... method inference (line 72) | def inference(self): method loss_seq2seq (line 110) | def loss_seq2seq(self): method train (line 119) | def train(self): method instantiate_weights (line 128) | def instantiate_weights(self): method get_mask (line 136) | def get_mask(self,sequence_length): function test_training (line 142) | def test_training(): function test_predict (line 187) | def test_predict(): function test_training_batch (line 231) | def test_training_batch(): function get_unique_labels (line 282) | def get_unique_labels(length=5): function get_unique_labels_batch (line 290) | def get_unique_labels_batch(batch_size,length=None): FILE: a07_Transformer/a2_transformer_classification.py class Transformer (line 32) | class Transformer(BaseClass): method __init__ (line 33) | def __init__(self, num_classes, learning_rate, batch_size, decay_steps... method inference (line 71) | def inference(self): method loss (line 95) | def loss(self, l2_lambda=0.0001): # 0.001 method train (line 115) | def train(self): method instantiate_weights (line 124) | def instantiate_weights(self): method get_mask (line 132) | def get_mask(self,sequence_length): function test_training (line 138) | def test_training(): function test_predict (line 181) | def test_predict(): function get_unique_labels (line 219) | def get_unique_labels(length=5): function get_unique_labels_batch (line 227) | def get_unique_labels_batch(batch_size,length=None): FILE: a07_Transformer/data_util_zhihu.py function create_voabulary (line 13) | def create_voabulary(simple=None,word2vec_model_path='../zhihu-word2vec-... function create_voabulary_label (line 45) | def create_voabulary_label(voabulary_label='../train-zhihu4-only-title-a... function sort_by_value (line 95) | def sort_by_value(d): function create_voabulary_labelO (line 101) | def create_voabulary_labelO(): function load_data_multilabel_new (line 117) | def load_data_multilabel_new(vocabulary_word2index,vocabulary_word2index... function load_data_multilabel_new_twoCNN (line 201) | def load_data_multilabel_new_twoCNN(vocabulary_word2index,vocabulary_wor... function load_data (line 263) | def load_data(vocabulary_word2index,vocabulary_word2index_label,valid_po... function process_one_sentence_to_get_ui_bi_tri_gram (line 304) | def process_one_sentence_to_get_ui_bi_tri_gram(sentence,n_gram=3): function load_data_with_multilabels (line 334) | def load_data_with_multilabels(vocabulary_word2index,vocabulary_word2ind... function transform_multilabel_as_multihot (line 386) | def transform_multilabel_as_multihot(label_list,label_size=1999): #1999l... function transform_multilabel_as_multihotO (line 398) | def transform_multilabel_as_multihotO(label_list,label_size=1999): #1999... function load_final_test_data (line 405) | def load_final_test_data(file_path): function load_data_predict (line 416) | def load_data_predict(vocabulary_word2index,vocabulary_word2index_label,... function proces_label_to_algin (line 434) | def proces_label_to_algin(ys_list,require_size=5): function write_uigram_to_trigram (line 453) | def write_uigram_to_trigram(): function test_pad (line 459) | def test_pad(): function read_topic_info (line 466) | def read_topic_info(): function stat_training_data_length (line 483) | def stat_training_data_length(): FILE: a08_EntityNetwork/a3_entity_network.py class EntityNetwork (line 10) | class EntityNetwork: method __init__ (line 11) | def __init__(self, num_classes, learning_rate, batch_size, decay_steps... method inference (line 68) | def inference(self): method embedding_with_mask (line 83) | def embedding_with_mask(self): method input_encoder_bow (line 94) | def input_encoder_bow(self): method input_encoder_bi_lstm (line 99) | def input_encoder_bi_lstm(self): method activation (line 128) | def activation(self,features, scope=None): # scope=None method output_module (line 135) | def output_module(self): method rnn_story (line 154) | def rnn_story(self): method cell (line 174) | def cell(self,s_t,h_all,w_all,i): method loss (line 201) | def loss(self, l2_lambda=0.0001): # 0.001 method loss_multilabel (line 212) | def loss_multilabel(self, l2_lambda=0.0001): #this loss function is fo... method smoothing_cross_entropy (line 224) | def smoothing_cross_entropy(self,logits, labels, vocab_size, confidenc... method train (line 242) | def train(self): method instantiate_weights (line 255) | def instantiate_weights(self): function test (line 283) | def test(): function predict (line 325) | def predict(): FILE: a08_EntityNetwork/a3_predict.py function main (line 43) | def main(_): function get_label_using_logits (line 91) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 101) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 113) | def write_question_id_with_labels(question_id,labels_list,f): function get_label_using_logits_batch (line 118) | def get_label_using_logits_batch(question_id_sublist,logits_batch,vocabu... function write_question_id_with_labels (line 132) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a08_EntityNetwork/a3_train.py function main (line 44) | def main(_): function assign_pretrained_word_embedding (line 146) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 179) | def do_eval(sess,model,evalX,evalY,batch_size,vocabulary_index2word_labe... function get_label_using_logits (line 199) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 210) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: a08_EntityNetwork/data_util_zhihu.py function create_voabulary (line 13) | def create_voabulary(simple=None,word2vec_model_path='../zhihu-word2vec-... function create_voabulary_label (line 45) | def create_voabulary_label(voabulary_label='train-zhihu4-only-title-all.... function sort_by_value (line 95) | def sort_by_value(d): function create_voabulary_labelO (line 101) | def create_voabulary_labelO(): function load_data_multilabel_new (line 117) | def load_data_multilabel_new(vocabulary_word2index,vocabulary_word2index... function load_data_multilabel_new_twoCNN (line 201) | def load_data_multilabel_new_twoCNN(vocabulary_word2index,vocabulary_wor... function load_data (line 263) | def load_data(vocabulary_word2index,vocabulary_word2index_label,valid_po... function process_one_sentence_to_get_ui_bi_tri_gram (line 304) | def process_one_sentence_to_get_ui_bi_tri_gram(sentence,n_gram=3): function load_data_with_multilabels (line 334) | def load_data_with_multilabels(vocabulary_word2index,vocabulary_word2ind... function transform_multilabel_as_multihot (line 386) | def transform_multilabel_as_multihot(label_list,label_size=1999): #1999l... function transform_multilabel_as_multihotO (line 398) | def transform_multilabel_as_multihotO(label_list,label_size=1999): #1999... function load_final_test_data (line 405) | def load_final_test_data(file_path): function load_data_predict (line 416) | def load_data_predict(vocabulary_word2index,vocabulary_word2index_label,... function proces_label_to_algin (line 434) | def proces_label_to_algin(ys_list,require_size=5): function write_uigram_to_trigram (line 453) | def write_uigram_to_trigram(): function test_pad (line 459) | def test_pad(): function read_topic_info (line 466) | def read_topic_info(): function stat_training_data_length (line 483) | def stat_training_data_length(): FILE: a08_predict_ensemble.py function main (line 69) | def main(_): function get_label_using_logits (line 186) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 196) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 208) | def write_question_id_with_labels(question_id,labels_list,f): function get_label_using_logits_batch (line 213) | def get_label_using_logits_batch(question_id_sublist,logits_batch,vocabu... function write_question_id_with_labels (line 227) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a09_DynamicMemoryNet/a8_dynamic_memory_network.py class DynamicMemoryNetwork (line 16) | class DynamicMemoryNetwork: method __init__ (line 17) | def __init__(self, num_classes, learning_rate, batch_size, decay_steps... method inference (line 74) | def inference(self): method input_module (line 86) | def input_module(self): method question_module (line 94) | def question_module(self): method episodic_memory_module (line 103) | def episodic_memory_module(self):#input(story):[batch_size,story_lengt... method answer_module (line 140) | def answer_module(self): method gated_gru (line 163) | def gated_gru(self,c_current,h_previous,g_current): method attention_mechanism_parallel (line 177) | def attention_mechanism_parallel(self,c_full,m,q,i): method x1Wx2_parallel (line 206) | def x1Wx2_parallel(self,x1,x2,scope): method gru_cell (line 222) | def gru_cell(self, Xt, h_t_minus_1,variable_scope): method loss (line 240) | def loss(self, l2_lambda=0.0001): # 0.001 method loss_multilabel (line 251) | def loss_multilabel(self, l2_lambda=0.0001): #0.0001 this loss functio... method smoothing_cross_entropy (line 263) | def smoothing_cross_entropy(self,logits, labels, vocab_size, confidenc... method train (line 281) | def train(self): method instantiate_weights (line 293) | def instantiate_weights(self): function train (line 315) | def train(): function predict (line 356) | def predict(): FILE: a09_DynamicMemoryNet/a8_predict.py function main (line 46) | def main(_): function get_label_using_logits (line 96) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function get_label_using_logits_with_value (line 106) | def get_label_using_logits_with_value(logits,vocabulary_index2word_label... function write_question_id_with_labels (line 118) | def write_question_id_with_labels(question_id,labels_list,f): function get_label_using_logits_batch (line 123) | def get_label_using_logits_batch(question_id_sublist,logits_batch,vocabu... function write_question_id_with_labels (line 137) | def write_question_id_with_labels(question_id,labels_list,f): FILE: a09_DynamicMemoryNet/a8_train.py function main (line 45) | def main(_): function assign_pretrained_word_embedding (line 144) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 177) | def do_eval(sess,model,evalX,evalY,batch_size,vocabulary_index2word_labe... function get_label_using_logits (line 192) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 203) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: aa1_data_util/1_process_zhihu.py function split_list (line 83) | def split_list(listt): function write_data_to_file_system (line 113) | def write_data_to_file_system(file_name, data): function write_data_to_file_system_multilabel (line 122) | def write_data_to_file_system_multilabel(file_name, data): FILE: aa1_data_util/3_process_zhihu_question_topic_relation.py function read_topic_info (line 62) | def read_topic_info(): function split_list (line 98) | def split_list(listt): function write_data_to_file_system (line 134) | def write_data_to_file_system(file_name, data): FILE: aa1_data_util/data_util_zhihu.py function create_voabulary (line 13) | def create_voabulary(simple=None,word2vec_model_path='zhihu-word2vec-tit... function create_voabulary_label (line 45) | def create_voabulary_label(voabulary_label='train-zhihu4-only-title-all.... function sort_by_value (line 95) | def sort_by_value(d): function create_voabulary_labelO (line 101) | def create_voabulary_labelO(): function load_data_multilabel_new (line 117) | def load_data_multilabel_new(vocabulary_word2index,vocabulary_word2index... function load_data_multilabel_new_twoCNN (line 201) | def load_data_multilabel_new_twoCNN(vocabulary_word2index,vocabulary_wor... function load_data (line 263) | def load_data(vocabulary_word2index,vocabulary_word2index_label,valid_po... function process_one_sentence_to_get_ui_bi_tri_gram (line 304) | def process_one_sentence_to_get_ui_bi_tri_gram(sentence,n_gram=3): function load_data_with_multilabels (line 334) | def load_data_with_multilabels(vocabulary_word2index,vocabulary_word2ind... function transform_multilabel_as_multihot (line 386) | def transform_multilabel_as_multihot(label_list,label_size=1999): #1999l... function transform_multilabel_as_multihotO (line 398) | def transform_multilabel_as_multihotO(label_list,label_size=1999): #1999... function load_final_test_data (line 405) | def load_final_test_data(file_path): function load_data_predict (line 416) | def load_data_predict(vocabulary_word2index,vocabulary_word2index_label,... function proces_label_to_algin (line 434) | def proces_label_to_algin(ys_list,require_size=5): function write_uigram_to_trigram (line 454) | def write_uigram_to_trigram(): function test_pad (line 460) | def test_pad(): function read_topic_info (line 467) | def read_topic_info(): function stat_training_data_length (line 484) | def stat_training_data_length(): FILE: aa2_ClassificationTflearn/p2_classification_tflearn.py function convert_int_to_one_hot (line 17) | def convert_int_to_one_hot(number,label_size): FILE: aa2_ClassificationTflearn/p2_classification_tflearn_demo.py function convert_int_to_one_hot (line 17) | def convert_int_to_one_hot(number,label_size): FILE: aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_model.py class TextCNN_with_RCNN (line 8) | class TextCNN_with_RCNN: method __init__ (line 9) | def __init__(self, filter_sizes,num_filters,num_classes, learning_rate... method instantiate_weights_cnn (line 59) | def instantiate_weights_cnn(self): method instantiate_weights_rcnn (line 66) | def instantiate_weights_rcnn(self): method inference1 (line 82) | def inference1(self): method get_context_left (line 126) | def get_context_left(self,context_left,embedding_previous): method get_context_right (line 138) | def get_context_right(self,context_right,embedding_afterward): method conv_layer_with_recurrent_structure (line 150) | def conv_layer_with_recurrent_structure(self): method inference2 (line 191) | def inference2(self): method inference (line 209) | def inference(self): method loss (line 219) | def loss(self,l2_lambda=0.0001):#0.001 method loss_multilabel (line 230) | def loss_multilabel(self,l2_lambda=0.00001): #0.0001#this loss functio... method train (line 245) | def train(self): function test (line 252) | def test(): FILE: aa4_TextCNN_with_RCNN/p72_TextCNN_with_RCNN_train.py function main (line 39) | def main(_): function assign_pretrained_word_embedding (line 119) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 152) | def do_eval(sess,textCNN,evalX,evalY,batch_size,vocabulary_index2word_la... function get_label_using_logits (line 168) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 179) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: aa5_BiLstmTextRelation/p9_BiLstmTextRelation_model.py class BiLstmTextRelation (line 12) | class BiLstmTextRelation: method __init__ (line 13) | def __init__(self,num_classes, learning_rate, batch_size, decay_steps,... method instantiate_weights (line 47) | def instantiate_weights(self): method inference (line 54) | def inference(self): method loss (line 79) | def loss(self,l2_lambda=0.0001): method train (line 90) | def train(self): FILE: aa5_BiLstmTextRelation/p9_BiLstmTextRelation_train.py function main (line 33) | def main(_): function assign_pretrained_word_embedding (line 117) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 150) | def do_eval(sess,biLstmTR,evalX,evalY,batch_size,vocabulary_index2word_l... function get_label_using_logits (line 163) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 174) | def calculate_accuracy(labels_predicted, labels,eval_counter): FILE: aa6_TwoCNNTextRelation/p9_twoCNNTextRelation_model.py class TwoCNNTextRelation (line 9) | class TwoCNNTextRelation: method __init__ (line 10) | def __init__(self, filter_sizes,num_filters,num_classes, learning_rate... method instantiate_weights (line 47) | def instantiate_weights(self): method inference (line 54) | def inference(self): method conv_relu_pool_dropout (line 72) | def conv_relu_pool_dropout(self,sentence_embeddings_expanded, name_sco... method loss (line 113) | def loss(self,l2_lambda=0.0001):#0.001 method loss_multilabel (line 124) | def loss_multilabel(self,l2_lambda=0.001): #this loss function is for ... method train (line 138) | def train(self): FILE: aa6_TwoCNNTextRelation/p9_twoCNNTextRelation_train.py function main (line 36) | def main(_): function assign_pretrained_word_embedding (line 117) | def assign_pretrained_word_embedding(sess,vocabulary_index2word,vocab_si... function do_eval (line 150) | def do_eval(sess,twoCNNTR,evalX,evalX2,evalY,batch_size,vocabulary_index... function get_label_using_logits (line 163) | def get_label_using_logits(logits,vocabulary_index2word_label,top_number... function calculate_accuracy (line 174) | def calculate_accuracy(labels_predicted, labels,eval_counter):