SYMBOL INDEX (178 symbols across 13 files) FILE: Machine Learning/6. EM/gmm_em/gmm.py function debug (line 17) | def debug(*args, **kwargs): function phi (line 28) | def phi(Y, mu_k, cov_k): function getExpectation (line 39) | def getExpectation(Y, mu, cov, alpha): function maximize (line 71) | def maximize(Y, gamma): function scale_data (line 105) | def scale_data(Y): function init_params (line 120) | def init_params(shape, K): function GMM_EM (line 136) | def GMM_EM(Y, K, times): FILE: Machine Learning/9. KNN/handwritingClass/handwritingClass.py function createDataSet (line 9) | def createDataSet(): function classify0 (line 21) | def classify0(inX, dataSet, labels, k): function test1 (line 138) | def test1(): function file2matrix (line 149) | def file2matrix(filename): function autoNorm (line 178) | def autoNorm(dataSet): function datingClassTest (line 207) | def datingClassTest(): function img2vector (line 233) | def img2vector(filename): function handwritingClassTest (line 250) | def handwritingClassTest(): FILE: NLP/16.4 textRNN & textCNN/cnews_loader.py function native_word (line 17) | def native_word(word, encoding='utf-8'): function native_content (line 25) | def native_content(content): function open_file (line 32) | def open_file(filename, mode='r'): function read_file (line 43) | def read_file(filename): function build_vocab (line 58) | def build_vocab(train_dir, vocab_dir, vocab_size=5000): function read_vocab (line 74) | def read_vocab(vocab_dir): function read_category (line 84) | def read_category(): function to_words (line 95) | def to_words(content, words): function process_file (line 100) | def process_file(filename, word_to_id, cat_to_id, max_length=600): function batch_iter (line 116) | def batch_iter(x, y, batch_size=64): FILE: NLP/16.4 textRNN & textCNN/cnn_model.py class TCNNConfig (line 6) | class TCNNConfig(object): class TextCNN (line 28) | class TextCNN(object): method __init__ (line 31) | def __init__(self, config): method cnn (line 41) | def cnn(self): FILE: NLP/16.4 textRNN & textCNN/rnn_model.py class TRNNConfig (line 6) | class TRNNConfig(object): class TextRNN (line 29) | class TextRNN(object): method __init__ (line 31) | def __init__(self, config): method rnn (line 41) | def rnn(self): FILE: NLP/16.6 Attention/datautil.py function getRawFileList (line 26) | def getRawFileList( path): function get_ch_lable (line 35) | def get_ch_lable(txt_file,Isch=True,normalize_digits=False): function get_ch_path_text (line 58) | def get_ch_path_text(raw_data_dir,Isch=True,normalize_digits=False): function basic_tokenizer (line 85) | def basic_tokenizer(sentence): function fenci (line 99) | def fenci(training_data): function create_vocabulary (line 126) | def create_vocabulary(vocabulary_file, raw_data_dir, max_vocabulary_size... function build_dataset (line 153) | def build_dataset(words, n_words): function create_seq2seqfile (line 174) | def create_seq2seqfile(data ,sorcefile,targetfile,textssz): function plot_scatter_lengths (line 186) | def plot_scatter_lengths(title, x_title, y_title, x_lengths, y_lengths): function plot_histo_lengths (line 195) | def plot_histo_lengths(title, lengths): function splitFileOneline (line 212) | def splitFileOneline(training_data ,textssz): function analysisfile (line 219) | def analysisfile(source_file,target_file): function initialize_vocabulary (line 248) | def initialize_vocabulary(vocabulary_path): function sentence_to_ids (line 261) | def sentence_to_ids(sentence, vocabulary, function textfile_to_idsfile (line 278) | def textfile_to_idsfile(data_file_name, target_file_name, vocab, function textdir_to_idsdir (line 295) | def textdir_to_idsdir(textdir,idsdir,vocab, normalize_digits=True,Isch=T... function ids2texts (line 308) | def ids2texts( indices,rev_vocab): function main (line 334) | def main(): FILE: NLP/16.6 Attention/seq2seq_model.py class Seq2SeqModel (line 31) | class Seq2SeqModel(object): method __init__ (line 41) | def __init__(self, method step (line 196) | def step(self, session, encoder_inputs, decoder_inputs, target_weights, method get_batch (line 254) | def get_batch(self, data, bucket_id): FILE: NLP/16.6 Attention/test.py function getfanyiInfo (line 49) | def getfanyiInfo(): function main (line 64) | def main(): function createModel (line 111) | def createModel(session, forward_only,from_vocab_size,to_vocab_size): FILE: NLP/16.8 BERT/download_glue_data.py function download_and_extract (line 41) | def download_and_extract(task, data_dir): function format_mrpc (line 50) | def format_mrpc(data_dir, path_to_data): function download_diagnostic (line 94) | def download_diagnostic(data_dir): function get_tasks (line 103) | def get_tasks(task_names): function main (line 114) | def main(arguments): FILE: NLP/16.8 BERT/modeling.py function gelu (line 29) | def gelu(x): class BertConfig (line 37) | class BertConfig(object): method __init__ (line 40) | def __init__(self, method from_dict (line 89) | def from_dict(cls, json_object): method from_json_file (line 97) | def from_json_file(cls, json_file): method to_dict (line 103) | def to_dict(self): method to_json_string (line 108) | def to_json_string(self): class BERTLayerNorm (line 113) | class BERTLayerNorm(nn.Module): method __init__ (line 114) | def __init__(self, config, variance_epsilon=1e-12): method forward (line 122) | def forward(self, x): class BERTEmbeddings (line 128) | class BERTEmbeddings(nn.Module): method __init__ (line 129) | def __init__(self, config): method forward (line 142) | def forward(self, input_ids, token_type_ids=None): class BERTSelfAttention (line 159) | class BERTSelfAttention(nn.Module): method __init__ (line 160) | def __init__(self, config): method transpose_for_scores (line 176) | def transpose_for_scores(self, x): method forward (line 181) | def forward(self, hidden_states, attention_mask): class BERTSelfOutput (line 210) | class BERTSelfOutput(nn.Module): method __init__ (line 211) | def __init__(self, config): method forward (line 217) | def forward(self, hidden_states, input_tensor): class BERTAttention (line 224) | class BERTAttention(nn.Module): method __init__ (line 225) | def __init__(self, config): method forward (line 230) | def forward(self, input_tensor, attention_mask): class BERTIntermediate (line 236) | class BERTIntermediate(nn.Module): method __init__ (line 237) | def __init__(self, config): method forward (line 242) | def forward(self, hidden_states): class BERTOutput (line 248) | class BERTOutput(nn.Module): method __init__ (line 249) | def __init__(self, config): method forward (line 255) | def forward(self, hidden_states, input_tensor): class BERTLayer (line 262) | class BERTLayer(nn.Module): method __init__ (line 263) | def __init__(self, config): method forward (line 269) | def forward(self, hidden_states, attention_mask): class BERTEncoder (line 276) | class BERTEncoder(nn.Module): method __init__ (line 277) | def __init__(self, config): method forward (line 282) | def forward(self, hidden_states, attention_mask): class BERTPooler (line 290) | class BERTPooler(nn.Module): method __init__ (line 291) | def __init__(self, config): method forward (line 296) | def forward(self, hidden_states): class BertModel (line 305) | class BertModel(nn.Module): method __init__ (line 322) | def __init__(self, config: BertConfig): method forward (line 333) | def forward(self, input_ids, token_type_ids=None, attention_mask=None): class BertForSequenceClassification (line 360) | class BertForSequenceClassification(nn.Module): method __init__ (line 381) | def __init__(self, config, num_labels): method forward (line 399) | def forward(self, input_ids, token_type_ids, attention_mask, labels=No... class BertForQuestionAnswering (line 411) | class BertForQuestionAnswering(nn.Module): method __init__ (line 430) | def __init__(self, config): method forward (line 449) | def forward(self, input_ids, token_type_ids, attention_mask, start_pos... FILE: NLP/16.8 BERT/optimization.py function warmup_cosine (line 22) | def warmup_cosine(x, warmup=0.002): function warmup_constant (line 27) | def warmup_constant(x, warmup=0.002): function warmup_linear (line 32) | def warmup_linear(x, warmup=0.002): class BERTAdam (line 44) | class BERTAdam(Optimizer): method __init__ (line 58) | def __init__(self, params, lr, warmup=-1, t_total=-1, schedule='warmup... method get_lr (line 78) | def get_lr(self): method to (line 93) | def to(self, device): method initialize_step (line 99) | def initialize_step(self, initial_step): method step (line 114) | def step(self, closure=None): FILE: NLP/16.8 BERT/run_classifier_word.py class InputExample (line 44) | class InputExample(object): method __init__ (line 47) | def __init__(self, guid, text_a, text_b=None, label=None): class InputFeatures (line 65) | class InputFeatures(object): method __init__ (line 68) | def __init__(self, input_ids, input_mask, segment_ids, label_id): class DataProcessor (line 75) | class DataProcessor(object): method get_train_examples (line 78) | def get_train_examples(self, data_dir): method get_dev_examples (line 82) | def get_dev_examples(self, data_dir): method get_labels (line 86) | def get_labels(self): method _read_tsv (line 91) | def _read_tsv(cls, input_file, quotechar=None): class NewsProcessor (line 99) | class NewsProcessor(DataProcessor): method __init__ (line 102) | def __init__(self): method get_train_examples (line 105) | def get_train_examples(self, data_dir): method get_dev_examples (line 111) | def get_dev_examples(self, data_dir): method get_labels (line 116) | def get_labels(self): method _create_examples (line 120) | def _create_examples(self, lines, set_type): class MrpcProcessor (line 134) | class MrpcProcessor(DataProcessor): method get_train_examples (line 137) | def get_train_examples(self, data_dir): method get_dev_examples (line 143) | def get_dev_examples(self, data_dir): method get_labels (line 148) | def get_labels(self): method _create_examples (line 152) | def _create_examples(self, lines, set_type): class MnliProcessor (line 166) | class MnliProcessor(DataProcessor): method get_train_examples (line 169) | def get_train_examples(self, data_dir): method get_dev_examples (line 174) | def get_dev_examples(self, data_dir): method get_labels (line 180) | def get_labels(self): method _create_examples (line 184) | def _create_examples(self, lines, set_type): class ColaProcessor (line 199) | class ColaProcessor(DataProcessor): method get_train_examples (line 202) | def get_train_examples(self, data_dir): method get_dev_examples (line 207) | def get_dev_examples(self, data_dir): method get_labels (line 212) | def get_labels(self): method _create_examples (line 216) | def _create_examples(self, lines, set_type): function convert_examples_to_features (line 228) | def convert_examples_to_features(examples, label_list, max_seq_length, t... function _truncate_seq_pair (line 324) | def _truncate_seq_pair(tokens_a, tokens_b, max_length): function accuracy (line 340) | def accuracy(out, labels): function copy_optimizer_params_to_model (line 344) | def copy_optimizer_params_to_model(named_params_model, named_params_opti... function set_optimizer_params_grad (line 354) | def set_optimizer_params_grad(named_params_optimizer, named_params_model... function main (line 370) | def main(): FILE: NLP/16.8 BERT/tokenization_word.py function convert_to_unicode (line 25) | def convert_to_unicode(text): function printable_text (line 45) | def printable_text(text): function load_vocab (line 68) | def load_vocab(vocab_file): function convert_tokens_to_ids (line 93) | def convert_tokens_to_ids(vocab, tokens): 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 118) | def tokenize(self, text): method convert_tokens_to_ids (line 126) | def convert_tokens_to_ids(self, tokens): class BasicTokenizer (line 130) | class BasicTokenizer(object): method __init__ (line 133) | def __init__(self, do_lower_case=True): method tokenize (line 141) | def tokenize(self, text): method _run_strip_accents (line 163) | def _run_strip_accents(self, text): method _run_split_on_punc (line 174) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 194) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 207) | def _is_chinese_char(self, cp): method _clean_text (line 229) | def _clean_text(self, text): class WordpieceTokenizer (line 243) | class WordpieceTokenizer(object): method __init__ (line 246) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 251) | def tokenize(self, text): function _is_whitespace (line 305) | def _is_whitespace(char): function _is_control (line 317) | def _is_control(char): function _is_punctuation (line 329) | def _is_punctuation(char):