MCPcopy Create free account

hub / github.com/Edward-Sun/SLM / functions

Functions31 in github.com/Edward-Sun/SLM

↓ 3 callersMethod__init__
Constructs SLMConfig.
codes/model.py:24
↓ 2 callersMethodrestore
(self, uchars, segments)
codes/tokenization.py:107
↓ 2 callersMethodto_json_string
Serializes this instance to a JSON string.
codes/model.py:77
↓ 1 callersMethod_is_chinese_char
Checks whether uchar is the codepoint of a CJK character.
codes/tokenization.py:119
↓ 1 callersMethodfrom_dict
Constructs a `SLMConfig` from a Python dictionary of parameters.
codes/model.py:58
↓ 1 callersMethodfrom_json_file
Constructs a `SLMConfig` from a json file of parameters.
codes/model.py:66
↓ 1 callersMethodget_init_states
(self, batch_size)
codes/model.py:345
↓ 1 callersFunctionmain
(args)
codes/run.py:118
↓ 1 callersMethodone_shot_iterator
Transform a PyTorch Dataloader into python iterator
codes/dataloader.py:141
↓ 1 callersMethodpadding_collate
(batch)
codes/dataloader.py:102
↓ 1 callersFunctionparse_args
(args=None)
codes/run.py:30
↓ 1 callersMethodsent_tokenize
(self, sent)
codes/tokenization.py:48
↓ 1 callersFunctionset_logger
Write logs to checkpoint and console
codes/run.py:95
↓ 1 callersMethodto_dict
Serializes this instance to a Python dictionary.
codes/model.py:72
↓ 1 callersMethodto_json_file
Serializes this instance to a JSON file.
codes/model.py:81
↓ 1 callersMethodtokenize
Tokenize uchar
codes/tokenization.py:144
↓ 1 callersMethodword2id
(self, word)
codes/tokenization.py:39
Method__getitem__
(self, index)
codes/dataloader.py:78
Method__init__
(self, vocab_file, max_seq_length=32, segment_token=' ',
codes/tokenization.py:9
Method__init__
(self, input_files, tokenizer, is_training=False,
codes/dataloader.py:15
Method__init__
(self, dataloader)
codes/dataloader.py:132
Method__init__
Constructor for BertModel.
codes/model.py:91
Method__init__
(self, input_size, hidden_size, layer_number, dropout_rate)
codes/model.py:321
Method__init__
(self, hidden_size, output_size, layer_number, dropout_rate)
codes/model.py:350
Method__len__
(self)
codes/dataloader.py:72
Method__next__
(self)
codes/dataloader.py:136
Methodforward
(self, x, lengths, segments=None, mode='unsupervised')
codes/model.py:145
Methodforward
(self, rnn_input, lengths, init_states)
codes/model.py:337
Methodforward
(self, rnn_input, init_states)
codes/model.py:364
Methodid2word
(self, _id)
codes/tokenization.py:45
Methodsingle_collate
(batch)
codes/dataloader.py:128