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!
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!