Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/649453932/Chinese-Text-Classification-Pytorch
/ functions
Functions
59 in github.com/649453932/Chinese-Text-Classification-Pytorch
⨍
Functions
59
◇
Types & classes
21
↓ 5 callers
Method
__init__
(self, config)
models/Transformer.py:47
↓ 3 callers
Function
build_iterator
(dataset, config)
utils.py:116
↓ 3 callers
Function
get_time_dif
获取已使用时间
utils.py:121
↓ 3 callers
Function
load_dataset
(path, pad_size=32)
utils_fasttext.py:52
↓ 3 callers
Function
load_dataset
(path, pad_size=32)
utils.py:43
↓ 2 callers
Method
_to_tensor
(self, datas)
utils_fasttext.py:101
↓ 2 callers
Method
_to_tensor
(self, datas)
utils.py:82
↓ 2 callers
Function
build_vocab
(file_path, tokenizer, max_size, min_freq)
utils.py:15
↓ 2 callers
Function
evaluate
(config, model, data_iter, test=False)
train_eval.py:99
↓ 1 callers
Method
_block
(self, x)
models/DPCNN.py:75
↓ 1 callers
Function
biGramHash
(sequence, t, buckets)
utils_fasttext.py:43
↓ 1 callers
Function
build_dataset
(config, ues_word)
utils.py:31
↓ 1 callers
Function
build_vocab
(file_path, tokenizer, max_size, min_freq)
utils_fasttext.py:15
↓ 1 callers
Method
conv_and_pool
(self, x, conv)
models/TextCNN.py:55
↓ 1 callers
Function
init_network
(model, method='xavier', exclude='embedding', seed=123)
train_eval.py:13
↓ 1 callers
Function
test
(config, model, test_iter)
train_eval.py:83
↓ 1 callers
Function
train
(config, model, train_iter, dev_iter, test_iter)
train_eval.py:29
↓ 1 callers
Function
triGramHash
(sequence, t, buckets)
utils_fasttext.py:47
Method
__init__
(self, batches, batch_size, device)
utils_fasttext.py:91
Method
__init__
(self, batches, batch_size, device)
utils.py:72
Method
__init__
(self, dataset, embedding)
models/TextRCNN.py:11
Method
__init__
(self, config)
models/TextRCNN.py:44
Method
__init__
(self, dataset, embedding)
models/Transformer.py:11
Method
__init__
(self, dim_model, num_head, hidden, dropout)
models/Transformer.py:77
Method
__init__
(self, embed, pad_size, dropout, device)
models/Transformer.py:89
Method
__init__
(self)
models/Transformer.py:105
Method
__init__
(self, dim_model, num_head, dropout=0.0)
models/Transformer.py:129
Method
__init__
(self, dim_model, hidden, dropout=0.0)
models/Transformer.py:164
Method
__init__
(self, dataset, embedding)
models/TextRNN.py:10
Method
__init__
(self, config)
models/TextRNN.py:43
Method
__init__
(self, dataset, embedding)
models/TextRNN_Att.py:11
Method
__init__
(self, config)
models/TextRNN_Att.py:45
Method
__init__
(self, dataset, embedding)
models/TextCNN.py:11
Method
__init__
(self, config)
models/TextCNN.py:44
Method
__init__
(self, dataset, embedding)
models/FastText.py:11
Method
__init__
(self, config)
models/FastText.py:44
Method
__init__
(self, dataset, embedding)
models/DPCNN.py:11
Method
__init__
(self, config)
models/DPCNN.py:43
Method
__iter__
(self)
utils_fasttext.py:130
Method
__iter__
(self)
utils.py:106
Method
__len__
(self)
utils_fasttext.py:133
Method
__len__
(self)
utils.py:109
Method
__next__
(self)
utils_fasttext.py:114
Method
__next__
(self)
utils.py:90
Function
build_dataset
(config, ues_word)
utils_fasttext.py:31
Function
build_iterator
(dataset, config)
utils_fasttext.py:140
Method
forward
(self, x)
models/TextRCNN.py:55
Method
forward
(self, x)
models/Transformer.py:65
Method
forward
(self, x)
models/Transformer.py:82
Method
forward
(self, x)
models/Transformer.py:97
Method
forward
Args: Q: [batch_size, len_Q, dim_Q] K: [batch_size, len_K, dim_K] V: [batch_size, len_V, dim_V]
models/Transformer.py:108
Method
forward
(self, x)
models/Transformer.py:142
Method
forward
(self, x)
models/Transformer.py:171
Method
forward
(self, x)
models/TextRNN.py:53
Method
forward
(self, x)
models/TextRNN_Att.py:60
Method
forward
(self, x)
models/TextCNN.py:60
Method
forward
(self, x)
models/FastText.py:57
Method
forward
(self, x)
models/DPCNN.py:57
Function
get_time_dif
获取已使用时间
utils_fasttext.py:145