SYMBOL INDEX (197 symbols across 11 files) FILE: NN/DNN/DNN_IMDB.py function plot_ (line 105) | def plot_(history,label): FILE: NN/RNN/LSTM/lstm_embedding.py function decode_review (line 45) | def decode_review(text_ids): function plot_learning_curves (line 91) | def plot_learning_curves(history,label,epochs,min_value,max_value): FILE: NN/RNN/LSTM/文本分类_lstm_subword.py function plot_learning_curves (line 125) | def plot_learning_curves(history,label,epochs,min_value,max_value): FILE: NN/RNN/LSTM/文本生成.py function split_input_target (line 73) | def split_input_target(id_text): function build_model (line 124) | def build_model(vocab_size,embedding_dim,rnn_units,batch_size): function loss (line 168) | def loss(labels,logits): function generate_text (line 208) | def generate_text(model,start_string,num_generate=1000): FILE: NN/RNN/rnn.py class Lang (line 18) | class Lang: method __init__ (line 19) | def __init__(self,name): method addSentence (line 29) | def addSentence(self,sentence): method addWord (line 35) | def addWord(self,word): function unicodeToAscii (line 46) | def unicodeToAscii(s): function normalizeString (line 55) | def normalizeString(s): function readLangs (line 64) | def readLangs(lang1,lang2,reverse=False): function filterPair (line 100) | def filterPair(p): function filterPairs (line 107) | def filterPairs(pairs): function prepareData (line 110) | def prepareData(lang1, lang2, reverse=False): class EncoderRNN (line 128) | class EncoderRNN(nn.Module): method __init__ (line 129) | def __init__(self, input_size, hidden_size): method forward (line 140) | def forward(self, input, hidden): method initHidden (line 149) | def initHidden(self): class DecoderRNN (line 154) | class DecoderRNN(nn.Module): method __init__ (line 155) | def __init__(self, hidden_size, output_size): method forward (line 167) | def forward(self, input, hidden): method initHidden (line 177) | def initHidden(self): class AttnDecoderRNN (line 180) | class AttnDecoderRNN(nn.Module): method __init__ (line 181) | def __init__(self, hidden_size, output_size, dropout_p=0.1, max_length... method forward (line 200) | def forward(self, input, hidden, encoder_outputs): method initHidden (line 227) | def initHidden(self): function indexesFromSentence (line 230) | def indexesFromSentence(lang, sentence): function tensorFromSentence (line 233) | def tensorFromSentence(lang, sentence): function tensorsFromPair (line 238) | def tensorsFromPair(pair): function train (line 246) | def train(input_tensor,target_tensor,encoder,decoder,encoder_optimizer,d... function asMinutes (line 315) | def asMinutes(s): function timeSince (line 321) | def timeSince(since, percent): function trainIters (line 328) | def trainIters(encoder,decoder,n_iters,print_every=1000,plot_every=100,l... function showPlot (line 374) | def showPlot(points): function evaluate (line 382) | def evaluate(encoder, decoder, sentence, max_length=MAX_LENGTH): function evaluateRandomly (line 417) | def evaluateRandomly(encoder, decoder, n=10): function showAttention (line 438) | def showAttention(input_sentence, output_words, attentions): function evaluateAndShowAttention (line 458) | def evaluateAndShowAttention(input_sentence): FILE: NN/RNN/单向rnn、双向rnn_embedding.py function decode_review (line 45) | def decode_review(text_ids): function plot_learning_curves (line 90) | def plot_learning_curves(history,label,epochs,min_value,max_value): FILE: nlp/code/modeling.py class BertConfig (line 31) | class BertConfig(object): method __init__ (line 34) | def __init__(self, method from_dict (line 83) | def from_dict(cls, json_object): method from_json_file (line 91) | def from_json_file(cls, json_file): method to_dict (line 97) | def to_dict(self): method to_json_string (line 102) | def to_json_string(self): class BertModel (line 107) | class BertModel(object): method __init__ (line 131) | def __init__(self, method get_pooled_output (line 248) | def get_pooled_output(self): method get_sequence_output (line 251) | def get_sequence_output(self): method get_all_encoder_layers (line 260) | def get_all_encoder_layers(self): method get_embedding_output (line 263) | def get_embedding_output(self): method get_embedding_table (line 274) | def get_embedding_table(self): function gelu (line 278) | def gelu(x): function get_activation (line 294) | def get_activation(activation_string): function get_assignment_map_from_checkpoint (line 331) | def get_assignment_map_from_checkpoint(tvars, init_checkpoint): function dropout (line 358) | def dropout(input_tensor, dropout_prob): function layer_norm (line 376) | def layer_norm(input_tensor, name=None): function layer_norm_and_dropout (line 382) | def layer_norm_and_dropout(input_tensor, dropout_prob, name=None): function create_initializer (line 389) | def create_initializer(initializer_range=0.02): function embedding_lookup (line 394) | def embedding_lookup(input_ids, function embedding_postprocessor (line 450) | def embedding_postprocessor(input_tensor, function create_attention_mask_from_input_mask (line 567) | def create_attention_mask_from_input_mask(from_tensor, to_mask): function attention_layer (line 601) | def attention_layer(from_tensor, function transformer_model (line 803) | def transformer_model(input_tensor, function get_shape_list (line 950) | def get_shape_list(tensor, expected_rank=None, name=None): function reshape_to_matrix (line 987) | def reshape_to_matrix(input_tensor): function reshape_from_matrix (line 1001) | def reshape_from_matrix(output_tensor, orig_shape_list): function assert_rank (line 1014) | def assert_rank(tensor, expected_rank, name=None): FILE: nlp/code/run_classifier.py class InputExample (line 130) | class InputExample(object): method __init__ (line 133) | def __init__(self, guid, text_a, text_b=None, label=None): class PaddingInputExample (line 151) | class PaddingInputExample(object): class InputFeatures (line 164) | class InputFeatures(object): method __init__ (line 167) | def __init__(self, class DataProcessor (line 180) | class DataProcessor(object): method get_train_examples (line 183) | def get_train_examples(self, data_dir): method get_dev_examples (line 187) | def get_dev_examples(self, data_dir): method get_test_examples (line 191) | def get_test_examples(self, data_dir): method get_labels (line 195) | def get_labels(self): method _read_tsv (line 200) | def _read_tsv(cls, input_file, quotechar=None): class MyDataProcessor (line 216) | class MyDataProcessor(DataProcessor): method get_train_examples (line 219) | def get_train_examples(self, data_dir): method get_dev_examples (line 235) | def get_dev_examples(self, data_dir): method get_test_examples (line 249) | def get_test_examples(self, data_dir): method get_labels (line 265) | def get_labels(self): method _read_tsv (line 270) | def _read_tsv(cls, input_file, quotechar=None): class XnliProcessor (line 284) | class XnliProcessor(DataProcessor): method __init__ (line 287) | def __init__(self): method get_train_examples (line 290) | def get_train_examples(self, data_dir): method get_dev_examples (line 309) | def get_dev_examples(self, data_dir): method get_labels (line 327) | def get_labels(self): class MnliProcessor (line 332) | class MnliProcessor(DataProcessor): method get_train_examples (line 335) | def get_train_examples(self, data_dir): method get_dev_examples (line 340) | def get_dev_examples(self, data_dir): method get_test_examples (line 346) | def get_test_examples(self, data_dir): method get_labels (line 351) | def get_labels(self): method _create_examples (line 355) | def _create_examples(self, lines, set_type): class MrpcProcessor (line 373) | class MrpcProcessor(DataProcessor): method get_train_examples (line 377) | def get_train_examples(self, data_dir): method get_dev_examples (line 382) | def get_dev_examples(self, data_dir): method get_test_examples (line 387) | def get_test_examples(self, data_dir): method get_labels (line 393) | def get_labels(self): method _create_examples (line 397) | def _create_examples(self, lines, set_type): class ColaProcessor (line 425) | class ColaProcessor(DataProcessor): method get_train_examples (line 428) | def get_train_examples(self, data_dir): method get_dev_examples (line 433) | def get_dev_examples(self, data_dir): method get_test_examples (line 438) | def get_test_examples(self, data_dir): method get_labels (line 443) | def get_labels(self): method _create_examples (line 447) | def _create_examples(self, lines, set_type): function convert_single_example (line 467) | def convert_single_example(ex_index, example, label_list, max_seq_length, function file_based_convert_examples_to_features (line 591) | def file_based_convert_examples_to_features( function file_based_input_fn_builder (line 623) | def file_based_input_fn_builder(input_file, seq_length, is_training, function _truncate_seq_pair (line 671) | def _truncate_seq_pair(tokens_a, tokens_b, max_length): function create_model (line 694) | def create_model(bert_config, is_training, input_ids, input_mask, segmen... function model_fn_builder (line 747) | def model_fn_builder(bert_config, num_labels, init_checkpoint, learning_... function input_fn_builder (line 845) | def input_fn_builder(features, seq_length, is_training, drop_remainder): function convert_examples_to_features (line 899) | def convert_examples_to_features(examples, label_list, max_seq_length, function main (line 915) | def main(_): FILE: nlp/code/run_squad.py class SquadExample (line 157) | class SquadExample(object): method __init__ (line 164) | def __init__(self, method __str__ (line 180) | def __str__(self): method __repr__ (line 183) | def __repr__(self): class InputFeatures (line 198) | class InputFeatures(object): method __init__ (line 201) | def __init__(self, function read_squad_examples (line 228) | def read_squad_examples(input_file, is_training): function convert_examples_to_features (line 334) | def convert_examples_to_features(examples, tokenizer, max_seq_length, function _improve_answer_span (line 533) | def _improve_answer_span(doc_tokens, input_start, input_end, tokenizer, function _check_is_max_context (line 578) | def _check_is_max_context(doc_spans, cur_span_index, position): function create_model (line 617) | def create_model(bert_config, is_training, input_ids, input_mask, segmen... function model_fn_builder (line 657) | def model_fn_builder(bert_config, init_checkpoint, learning_rate, function input_fn_builder (line 756) | def input_fn_builder(input_file, seq_length, is_training, drop_remainder): function write_predictions (line 810) | def write_predictions(all_examples, all_features, all_results, n_best_size, function get_final_text (line 1001) | def get_final_text(pred_text, orig_text, do_lower_case): function _get_best_indexes (line 1097) | def _get_best_indexes(logits, n_best_size): function _compute_softmax (line 1111) | def _compute_softmax(scores): class FeatureWriter (line 1134) | class FeatureWriter(object): method __init__ (line 1137) | def __init__(self, filename, is_training): method process_feature (line 1143) | def process_feature(self, feature): method close (line 1169) | def close(self): function validate_flags_or_throw (line 1173) | def validate_flags_or_throw(bert_config): function main (line 1202) | def main(_): FILE: nlp/code/tokenization.py function validate_case_matches_checkpoint (line 28) | def validate_case_matches_checkpoint(do_lower_case, init_checkpoint): function convert_to_unicode (line 78) | def convert_to_unicode(text): function printable_text (line 98) | def printable_text(text): function load_vocab (line 122) | def load_vocab(vocab_file): function convert_by_vocab (line 137) | def convert_by_vocab(vocab, items): function convert_tokens_to_ids (line 146) | def convert_tokens_to_ids(vocab, tokens): function convert_ids_to_tokens (line 150) | def convert_ids_to_tokens(inv_vocab, ids): function whitespace_tokenize (line 156) | def whitespace_tokenize(text): class FullTokenizer (line 166) | class FullTokenizer(object): method __init__ (line 169) | def __init__(self, vocab_file, do_lower_case=True): method tokenize (line 178) | def tokenize(self, text): method convert_tokens_to_ids (line 186) | def convert_tokens_to_ids(self, tokens): method convert_ids_to_tokens (line 189) | def convert_ids_to_tokens(self, ids): class BasicTokenizer (line 193) | class BasicTokenizer(object): method __init__ (line 196) | def __init__(self, do_lower_case=True): method tokenize (line 204) | def tokenize(self, text): method _run_strip_accents (line 229) | def _run_strip_accents(self, text): method _run_split_on_punc (line 241) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 262) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 276) | def _is_chinese_char(self, cp): method _clean_text (line 298) | def _clean_text(self, text): class WordpieceTokenizer (line 312) | class WordpieceTokenizer(object): method __init__ (line 315) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 320) | def tokenize(self, text): function _is_whitespace (line 374) | def _is_whitespace(char): function _is_control (line 386) | def _is_control(char): function _is_punctuation (line 398) | def _is_punctuation(char): FILE: nlp/models/functions.py function positional_encoding (line 14) | def positional_encoding(X, num_features, dropout_p=0.0, max_len=512) -> ... function _in_projection_packed (line 43) | def _in_projection_packed( function _scaled_dot_product_attention (line 94) | def _scaled_dot_product_attention( function multi_head_attention_forward (line 135) | def multi_head_attention_forward( class MultiheadAttention (line 233) | class MultiheadAttention(nn.Module): method __init__ (line 244) | def __init__(self, embed_dim, num_heads, dropout=0., bias=True, kdim=N... method _reset_parameters (line 276) | def _reset_parameters(self): method forward (line 288) | def forward(self, query: Tensor, key: Tensor, value: Tensor, key_paddi... class TransformerEncoderLayer (line 323) | class TransformerEncoderLayer(nn.Module): method __init__ (line 340) | def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, ... method forward (line 355) | def forward(self, src: Tensor, src_mask: Optional[Tensor] = None, src_... class TransformerDecoderLayer (line 372) | class TransformerDecoderLayer(nn.Module): method __init__ (line 389) | def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, ... method forward (line 408) | def forward(self, tgt: Tensor, memory: Tensor, tgt_mask: Optional[Tens... class TransformerEncoder (line 441) | class TransformerEncoder(nn.Module): method __init__ (line 455) | def __init__(self, encoder_layer, num_layers, norm=None): method forward (line 461) | def forward(self, src: Tensor, mask: Optional[Tensor] = None, src_key_... class TransformerDecoder (line 477) | class TransformerDecoder(nn.Module): method __init__ (line 491) | def __init__(self, decoder_layer, num_layers, norm=None): method forward (line 497) | def forward(self, tgt: Tensor, memory: Tensor, tgt_mask: Optional[Tens... class Transformer (line 519) | class Transformer(nn.Module): method __init__ (line 540) | def __init__(self, d_model: int = 512, nhead: int = 8, num_encoder_lay... method forward (line 568) | def forward(self, src: Tensor, tgt: Tensor, src_mask: Optional[Tensor]... method generate_square_subsequent_mask (line 612) | def generate_square_subsequent_mask(self, sz: int) -> Tensor: method _reset_parameters (line 618) | def _reset_parameters(self):