s-omranpour / fake-news-detection-pytorch Goto Github PK
View Code? Open in Web Editor NEWa hybrid deep neural network for fake news detection based on CSI paper
a hybrid deep neural network for fake news detection based on CSI paper
Hello,
I decided to open a new issue since it's a different bug and error. While running the training code, I get the following error, would you please upload a requirement.txt for python packages that you have used? e.g., python version, PyTorch version, etc.
File "/tmp/ipykernel_2468582/2857088609.py", line 62, in experiment
File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 821, in validate
return self._call_and_handle_interrupt(self._validate_impl, model, dataloaders, ckpt_path, verbose, datamodule)
File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 685, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 864, in _validate_impl
results = self._run(model, ckpt_path=self.validated_ckpt_path)
File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1128, in _run
verify_loop_configurations(self)
File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/configuration_validator.py", line 40, in verify_loop_configurations
__verify_eval_loop_configuration(trainer, model, "val")
File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/trainer/configuration_validator.py", line 170, in __verify_eval_loop_configuration
has_step = is_overridden(step_name, model)
File "/home/user/Fake news mitigation/venv37/lib/python3.7/site-packages/pytorch_lightning/utilities/model_helpers.py", line 47, in is_overridden
raise ValueError("Expected a parent")
ValueError: Expected a parent
I have found this https://stackoverflow.com/questions/69526806/pytorch-model-heplers-py-in-is-overridden-raise-valueerror-expected-a-paren but in your code, I see class CSIModel(pl.LightningModule)
, so it should be fine but it's not!
Hi there,
Could you please provide the processed dataset so that I can run your code?
Many thanks.
0%| | 0/4232 [00:00<?, ?it/s] --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) in 33 for event in tqdm(eid_train+eid_test): 34 event_str = str(event) ---> 35 tweets = json.load(open(os.path.join(path,event_str+'.json'),"r",encoding='utf-8')) 36 timestamps = [] 37 uid = [] FileNotFoundError: [Errno 2] No such file or directory: 'Data/Weibo/3566276356194468.json'
I can run your code,but I can't achieve 95.3% accuracy in the paper
Hello,
I am trying to run your code but I get this error:
`
TypeError Traceback (most recent call last)
Input In [44], in <cell line: 4>()
2 os.makedirs(save_path, exist_ok=True)
4 for eid in tqdm(events):
----> 5 xc, xs, y = get_event_features(eid)
6 pickle.dump(
7 {'x_capture': xc, 'x_score':xs, 'label': y},
8 open(save_path + eid + '.pkl', 'wb')
9 )
Input In [42], in get_event_features(eid)
49 print(eid)
50 print(doc)
---> 51 X_text += [doc_vectorizer.infer_vector(
52 # jieba.lcut(doc)
53 doc
54 ).reshape(1,-1)]
55 X_text = np.concatenate(X_text, axis=0)
57 # stack all
File ~/Research_direction/Fake news mitigation multimodal/venv38/lib/python3.8/site-packages/gensim/models/doc2vec.py:620, in Doc2Vec.infer_vector(self, doc_words, alpha, min_alpha, epochs)
592 """Infer a vector for given post-bulk training document.
593
594 Notes
(...)
617
618 """
619 if isinstance(doc_words, str): # a common mistake; fail with a nicer error
--> 620 raise TypeError("Parameter doc_words of infer_vector() must be a list of strings (not a single string).")
622 alpha = alpha or self.alpha
623 min_alpha = min_alpha or self.min_alpha
TypeError: Parameter doc_words of infer_vector() must be a list of strings (not a single string).
`
What should I do?
Thanks!
Could you please provide the data set you used at that time, thank you very much!
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.