Giter Site home page Giter Site logo

defend-web's People

Contributors

cuilimeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

defend-web's Issues

Gossipcop data files missing

Hey @cuilimeng, are the Gossipcop data files also available? I can see Politifact files but not Gossipcop. It would be really helpful in my research if the Gossipcop files could also be provided.

Inputs to operation sentence_lstm/while_1/Select_1 of type Select must have the same size and shape

Hi! I was using your project dEFEND code (https://www.dropbox.com/sh/rzczwopo618jyv2/AAA1mI2yvbt6TAfqpcxfjL8va?dl=0) as reference for a project we are working on. But, unfortunately, running the go_defend.py file with the dataset we collected from FakeNewsNet will have some errors. Specifically, the error is caused when model.fit is called and it is in the sentence lstm part. Please find exact error below:

Traceback (most recent call last):
File "go_defend.py", line 85, in
saved_model_filename=SAVED_MODEL_FILENAME)
File "/home/shreeshaa/d/dEFEND-5/fake news detection/dEFEND/defend.py", line 389, in train
callbacks=callbacks)
File "/home/shreeshaa/anaconda3/envs/d/lib/python3.7/site-packages/keras/engine/training.py", line 1039, in fit
validation_steps=validation_steps)
File "/home/shreeshaa/anaconda3/envs/d/lib/python3.7/site-packages/keras/engine/training_arrays.py", line 199, in fit_loop
outs = f(ins_batch)
File "/home/shreeshaa/anaconda3/envs/d/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 2715, in call
return self._call(inputs)
File "/home/shreeshaa/anaconda3/envs/d/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 2675, in _call
fetched = self._callable_fn(*array_vals)
File "/home/shreeshaa/anaconda3/envs/d/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1439, in call
run_metadata_ptr)
File "/home/shreeshaa/anaconda3/envs/d/lib/python3.7/site-packages/tensorflow/python/framework/errors_impl.py", line 528, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation sentence_lstm/while_1/Select_1 of type Select must have the same size and shape. Input 0: [20,12000] != input 1: [20,100]
[[{{node sentence_lstm/while_1/Select_1}}]]

Any advice would be extremely helpful. Thanks!

Exception has occurred: RuntimeError Unable to create link (name already exists)

`Exception has occurred: RuntimeError
Unable to create link (name already exists)
File "/Users/pete_o/Documents/Dev/InfoAuthN/news-dj-service/our3.py", line 400, in train
callbacks=callbacks)
File "/Users/pete_o/Documents/Dev/InfoAuthN/news-dj-service/go_defend.py", line 96, in
embeddings_path='saved_models', saved_model_dir='saved_models', saved_model_filename=SAVED_MODEL_FILENAME )

The exception is thrown from:

self.model.fit([encoded_train_c, encoded_train_x], y=train_y, validation_data=([encoded_val_c, encoded_val_x], val_y), batch_size=batch_size, epochs=epochs, verbose=1, callbacks=callbacks)

Environment:

`(venv) Peters-MBP:news-dj-service pete_o$ pip list
Package Version


absl-py 0.12.0
amqp 5.0.6
appdirs 1.4.3
astunparse 1.6.3
attrs 20.3.0
Automat 20.2.0
bcrypt 3.2.0
beautifulsoup4 4.7.1
billiard 3.6.4.0
blis 0.4.1
bs4 0.0.1
cached-property 1.5.2
cachetools 4.2.1
catalogue 1.0.0
celery 5.0.5
certifi 2019.3.9
cffi 1.14.5
chardet 3.0.4
Click 7.0
click-didyoumean 0.0.3
click-plugins 1.1.1
click-repl 0.1.6
cloud-tpu-client 0.10
constantly 15.1.0
corenlp 0.0.14
corenlp-protobuf 3.8.0
coverage 5.5
cryptography 3.4.7
cssselect 1.0.3
cymem 2.0.5
dateparser 1.0.0
decorator 5.0.7
dill 0.3.3
distlib 0.3.0
en-core-web-sm 2.2.0
feedfinder2 0.0.4
feedparser 5.2.1
filelock 3.0.12
Flask 1.0.2
flask-accept 0.0.6
Flask-Cors 3.0.7
Flask-JWT 0.3.2
Flask-PyMongo 2.3.0
futures 3.1.1
gast 0.3.3
glove-py 0.2.3
google-api-core 1.22.2
google-api-python-client 1.8.0
google-auth 1.28.1
google-auth-httplib2 0.1.0
google-auth-oauthlib 0.4.4
google-pasta 0.2.0
google-search-results 2.1.0
googleapis-common-protos 1.53.0
grpcio 1.37.1
gsearch 1.6.0
h5py 2.10.0
hammock 0.2.4
html5lib 1.1
httplib2 0.19.1
hyperlink 21.0.0
idna 2.8
importlib-metadata 1.6.0
incremental 21.3.0
itemadapter 0.2.0
itemloaders 1.0.4
itsdangerous 1.1.0
jieba3k 0.35.1
Jinja2 2.10
jmespath 0.10.0
joblib 1.0.1
jsonlines 2.0.0
Keras 2.4.3
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.2
kombu 5.0.2
lxml 4.6.3
Markdown 3.3.4
MarkupSafe 1.1.1
marshmallow 3.11.1
mock 4.0.3
mongomock 3.22.1
msgpack 1.0.2
msgpack-numpy 0.4.7.1
msgpack-python 0.5.6
murmurhash 1.0.5
newspaper3k 0.2.8
nltk 3.4
nose2 0.10.0
numpy 1.19.5
oauth2client 4.1.3
oauthlib 3.0.1
opt-einsum 3.3.0
pandas 1.2.4
parse 1.19.0
parsel 1.6.0
pathlib 1.0.1
pbr 5.6.0
Pillow 6.2.2
pip 21.1.1
pipenv 2018.11.26
plac 1.1.3
politifact 0.1
preshed 3.0.5
prompt-toolkit 3.0.18
Protego 0.1.16
protobuf 3.15.7
py-bcrypt 0.4
pyasn1 0.4.8
pyasn1-modules 0.2.8
pybind11 2.6.2
pycparser 2.20
pycurry 1.0
PyDispatcher 2.0.5
PyJWT 1.4.2
pymongo 3.11.4
pyOpenSSL 20.0.1
pyparsing 2.4.7
python-dateutil 2.8.0
python-dotenv 0.17.0
pytz 2021.1
PyYAML 5.1
queuelib 1.5.0
redis 3.5.3
regex 2021.4.4
requests 2.25.1
requests-file 1.4.3
requests-oauthlib 1.2.0
rsa 4.7.2
scikit-learn 0.24.2
scipy 1.4.1
Scrapy 2.4.1
selenium 3.141.0
sentinels 1.0.0
service-identity 18.1.0
setuptools 46.1.3
singledispatch 3.4.0.3
six 1.12.0
sklearn 0.0
soupsieve 1.8
spacy 2.2.3
srsly 1.0.5
stanford-corenlp 3.9.2
tensorboard 2.2.2
tensorboard-plugin-wit 1.8.0
tensorflow 2.2.0
tensorflow-estimator 2.2.0
termcolor 1.1.0
thinc 7.3.1
threadpoolctl 2.1.0
tinysegmenter 0.3
tldextract 2.2.1
toolz 0.11.1
tqdm 4.31.1
Twisted 21.2.0
twython 3.8.0
tzlocal 2.1
ujson 4.0.2
UNKNOWN 0.0.0
uritemplate 3.0.1
urllib3 1.26.4
vine 5.0.0
virtualenv 20.0.16
virtualenv-clone 0.5.4
w3lib 1.22.0
waitress 2.0.0
wasabi 0.8.2
wcwidth 0.2.5
webencodings 0.5.1
Werkzeug 0.15.1
wheel 0.34.2
wrapt 1.12.1
zipp 3.1.0
zope.interface 5.3.0
(venv) Peters-MBP:news-dj-service pete_o$ python --version
Python 3.7.2
(venv) Peters-MBP:news-dj-service pete_o$ virtualenv --version
virtualenv 20.0.16 from /Users/pete_o/Documents/Dev/InfoAuthN/news-dj-service/venv/lib/python3.7/site-packages/virtualenv/init.py
(venv) Peters-MBP:news-dj-service pete_o$ pip --version
pip 21.1.1 from /Users/pete_o/Documents/Dev/InfoAuthN/news-dj-service/venv/lib/python3.7/site-packages/pip (python 3.7)`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.