Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chengsen/PyTorch_TextGCN
/ functions
Functions
61 in github.com/chengsen/PyTorch_TextGCN
⨍
Functions
61
◇
Types & classes
10
↓ 3 callers
Function
print_graph_detail
格式化显示Graph参数 :param graph: :return:
utils.py:92
↓ 2 callers
Method
clean_str
(self, string)
data_processor.py:20
↓ 2 callers
Method
forward
(self, x, adj)
layer.py:51
↓ 2 callers
Method
log
(self, result: dict)
utils.py:222
↓ 2 callers
Method
remove_stopword
(self, string)
data_processor.py:67
↓ 2 callers
Method
save
(self)
build_graph.py:177
↓ 2 callers
Method
val
(self, x, prefix="val")
trainer.py:184
↓ 1 callers
Method
__init__
(self, nfeat, nhid, nclass, dropout)
layer.py:45
↓ 1 callers
Function
accuracy
(pred, targ)
utils.py:43
↓ 1 callers
Function
cal_pmi
(W_ij, W, word_freq_1, word_freq_2)
build_graph.py:54
↓ 1 callers
Method
clean_text
(self)
data_processor.py:112
↓ 1 callers
Method
convert_tensor
(self)
trainer.py:152
↓ 1 callers
Function
count_pmi
(windows_len, word_pair_count, word_window_freq, threshold)
build_graph.py:63
↓ 1 callers
Method
fit
(self)
trainer.py:109
↓ 1 callers
Function
get_pmi_edge
(content_lst, window_size=20, threshold=0.)
build_graph.py:76
↓ 1 callers
Method
get_pmi_edge
(self)
build_graph.py:110
↓ 1 callers
Method
get_tfidf_edge
(self)
build_graph.py:123
↓ 1 callers
Method
get_tfidf_vec
学习获得tfidf矩阵,及其对应的单词序列 :param content_lst: :return:
build_graph.py:139
↓ 1 callers
Function
get_train_test
(target_fn)
trainer.py:28
↓ 1 callers
Function
get_window
找出窗口 :param content_lst: :param window_size: :return:
build_graph.py:19
↓ 1 callers
Method
gpu_mem_get
get total, used and free memory (in MBs) for gpu `id`. if `id` is not passed, currently selected torch device is used
utils.py:69
↓ 1 callers
Method
gpu_mem_get_all
get total, used and free memory (in MBs) for each available gpu
utils.py:65
↓ 1 callers
Method
log_single
(self, key, value)
utils.py:226
↓ 1 callers
Function
macro_f1
(pred, targ, num_classes=None)
utils.py:10
↓ 1 callers
Function
main
()
build_graph.py:185
↓ 1 callers
Function
main
()
data_processor.py:152
↓ 1 callers
Function
main
(dataset, times)
trainer.py:214
↓ 1 callers
Function
normalize_adj
Symmetrically normalize adjacency matrix.
utils.py:144
↓ 1 callers
Function
parameter_parser
A method to parse up command line parameters. By default it trains on the PubMed yelp_dataset. The default hyperparameters give a good qualit
utils.py:207
↓ 1 callers
Method
prepare_data
(self)
trainer.py:139
↓ 1 callers
Function
preprocess_adj
Preprocessing of adjacency matrix for simple pygGCN model and conversion to tuple representation.
utils.py:123
↓ 1 callers
Function
print_table
(dst)
utils.py:107
↓ 1 callers
Function
read_file
(path, mode='r', encoding=None)
utils.py:86
↓ 1 callers
Function
remove_less_word
(lines_str, word_st)
data_processor.py:93
↓ 1 callers
Method
reset_parameters
(self)
layer.py:24
↓ 1 callers
Function
return_seed
(nums=10)
utils.py:117
↓ 1 callers
Method
set_description
(cls, desc)
trainer.py:130
↓ 1 callers
Method
set_seed
(self)
trainer.py:105
↓ 1 callers
Method
show_str
(self)
utils.py:229
↓ 1 callers
Function
sparse_mx_to_torch_sparse_tensor
Convert a scipy sparse matrix to a torch sparse tensor.
utils.py:134
↓ 1 callers
Method
test
(self)
trainer.py:206
↓ 1 callers
Method
train
(self)
trainer.py:160
Method
__call__
(self, val_loss, model=None)
utils.py:176
Method
__init__
(self, dataset)
build_graph.py:92
Method
__init__
(self)
data_processor.py:11
Method
__init__
(self, dataset, encoding=None)
data_processor.py:98
Method
__init__
(self)
utils.py:51
Method
__init__
Args: patience (int): How long to wait after last time validation loss improved. Default: 7
utils.py:157
Method
__init__
(self)
utils.py:218
Method
__init__
(self, in_features, out_features, bias=True)
layer.py:13
Method
__init__
(self, args)
trainer.py:42
Method
__init__
(self, args, model, pre_data)
trainer.py:93
Method
__repr__
(self)
layer.py:38
Method
forward
(self, infeatn, adj)
layer.py:30
Method
get_cuda_id
(self)
utils.py:57
Method
lean_str_sst
Tokenization/string cleaning for the SST yelp_dataset Original taken from https://github.com/yoonkim/CNN_sentence/blob/master
data_processor.py:58
Method
load_model
(self)
utils.py:203
Method
norm_str
(self, string)
data_processor.py:37
Method
replace_num
(self, string)
data_processor.py:83
Method
replace_urls
(self, string)
data_processor.py:87
Method
save_checkpoint
Saves model when validation loss decrease.
utils.py:195