ictmcg / pref-fend Goto Github PK
View Code? Open in Web Editor NEWOfficial repository to release the code and datasets in the paper, "Integrating Pattern- and Fact-based Fake News Detection via Model Preference Learning", CIKM 2021.
Official repository to release the code and datasets in the paper, "Integrating Pattern- and Fact-based Fake News Detection via Model Preference Learning", CIKM 2021.
Dear Zhang Xue Yao: I am a master student in SEU, and my research derection is in line with yours.Your paper "Pref-FEND"is quite well-wirtten, and I want to reproduce the result in this article. But I can't find the dataset refered in the article .I will appreciate it if you can kindly send me the dataset(including social media posts and relevant articles, named "Weibo Dataset" and "Twitter Dataset").I assure you that the dataset is for academic use only.Thanks so much~!
您好!运行完后在ckpts里的test-res-1-50里保存了很多文件,请问哪个是最终的测试结果呢?
Traceback (most recent call last):
File "main.py", line 158, in
graphs_pattern, graphs_others, nums_nodes)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/ZMD/Pref-FEND-main/model/PrefFEND.py", line 100, in forward
idxs, dataset, tokens_features, map_for_fact_detector=map_entity, map_for_pattern_detector=map_pattern, fcs=self.fcs)
File "/home/cv/ZMD/Pref-FEND-main/model/PrefFEND.py", line 62, in forward_PreferencedDetector
idxs, dataset, tokens_features, map_for_pattern_detector)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/ZMD/Pref-FEND-main/model/PatternBasedModels.py", line 131, in forward
out = self.forward_BERT(idxs, dataset, nodes_tokens, maps=tokened_maps)
File "/home/cv/ZMD/Pref-FEND-main/model/PatternBasedModels.py", line 144, in forward_BERT
seq_output, _ = self.bert(input_ids)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/modeling_bert.py", line 837, in forward
return_dict=return_dict,
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/modeling_bert.py", line 492, in forward
output_attentions,
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/modeling_bert.py", line 412, in forward
output_attentions=output_attentions,
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/modeling_bert.py", line 349, in forward
output_attentions,
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/modeling_bert.py", line 250, in forward
mixed_query_layer = self.query(hidden_states)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 91, in forward
return F.linear(input, self.weight, self.bias)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/functional.py", line 1676, in linear
output = input.matmul(weight.t())
RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling cublasCreate(handle)
Start training...
Start Training Epoch 0 : 2023-03-25 16:48:34
0%| | 0/2206 [00:01<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 158, in
graphs_pattern, graphs_others, nums_nodes)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/ZMD/Pref-FEND-main/model/PrefFEND.py", line 100, in forward
idxs, dataset, tokens_features, map_for_fact_detector=map_entity, map_for_pattern_detector=map_pattern, fcs=self.fcs)
File "/home/cv/ZMD/Pref-FEND-main/model/PrefFEND.py", line 62, in forward_PreferencedDetector
idxs, dataset, tokens_features, map_for_pattern_detector)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/ZMD/Pref-FEND-main/model/PatternBasedModels.py", line 131, in forward
out = self.forward_BERT(idxs, dataset, nodes_tokens, maps=tokened_maps)
File "/home/cv/ZMD/Pref-FEND-main/model/PatternBasedModels.py", line 163, in forward_BERT
out = self.fc(output)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 93, in forward
return F.linear(input, self.weight, self.bias)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/torch/nn/functional.py", line 1690, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: mat1 dim 1 must match mat2 dim 0
似乎是bert维度的问题,请问大佬要怎么设置呢
您好!python input_of_emotions.py --dataset 'Weibo' 时提示
No such file or directory: '../../resources/Chinese/大连
理工大学情感词汇本体库/preprocess/words2array.pkl'
FileNotFoundError: [Errno 2] No such file or directory: '../preprocess/BERT_Emo/code/preprocess/data/Twitter/train.npy'
大佬你好!单独的BERT_Emo以及其他不含BERT_Emo的模型组合都可以正常运行,只有BERT_Emo和MAC或者EVIN等组合时会报错,感觉是bert输入问题
==================== Experimental Dataset: Weibo ====================
Loading model...
Traceback (most recent call last):
File "main.py", line 57, in
model = PrefFEND(args)
File "/home/cv/ZMD/Pref-FEND-main/model/PrefFEND.py", line 29, in init
'{}(args)'.format(args.pattern_based_model))
File "", line 1, in
File "/home/cv/ZMD/Pref-FEND-main/model/PatternBasedModels.py", line 52, in init
args.bert_pretrained_model, return_dict=False)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/modeling_utils.py", line 853, in from_pretrained
**kwargs,
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/configuration_utils.py", line 312, in from_pretrained
config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/configuration_utils.py", line 335, in get_config_dict
if os.path.isdir(pretrained_model_name_or_path):
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/genericpath.py", line 42, in isdir
st = os.stat(s)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
==================== Experimental Dataset: Weibo ====================
Loading model...
Traceback (most recent call last):
File "main.py", line 57, in
model = PrefFEND(args)
File "/home/cv/ZMD/Pref-FEND-main/model/PrefFEND.py", line 29, in init
'{}(args)'.format(args.pattern_based_model))
File "", line 1, in
File "/home/cv/ZMD/Pref-FEND-main/model/PatternBasedModels.py", line 52, in init
args.bert_pretrained_model, return_dict=False)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/modeling_utils.py", line 853, in from_pretrained
**kwargs,
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/configuration_utils.py", line 312, in from_pretrained
config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/site-packages/transformers/configuration_utils.py", line 335, in get_config_dict
if os.path.isdir(pretrained_model_name_or_path):
File "/home/cv/miniconda3/envs/Zmd/lib/python3.6/genericpath.py", line 42, in isdir
st = os.stat(s)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.