yuhsinliu1993 / quora_questionpairs_dl Goto Github PK
View Code? Open in Web Editor NEWKaggle Competition: Using deep learning to solve quora's question pairs problem
Kaggle Competition: Using deep learning to solve quora's question pairs problem
when I use test data to predict :
python run.py --mode=pred --load_model="model_dir/model.h5" --test_data="./data/test.csv"
I get this error:
Traceback (most recent call last):
File "run.py", line 287, in <module>
tf.app.run(main=run, argv=[sys.argv[0]] + unparsed)
File "/Users/me/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "run.py", line 166, in run
do_pred(FLAGS.test_data)
File "run.py", line 38, in do_pred
model = esim.build_model(FLAGS.load_model)
File "/Users/me/iMac/400/403GithubProject/Quora_QuestionPairs_DL/ESIM.py", line 29, in build_model
embedded_a = embedding_layer(a)
File "/Users/me/iMac/400/403GithubProject/Quora_QuestionPairs_DL/layers.py", line 46, in __call__
projected = self.project(self.embed(sentence))
File "/Users/me/anaconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 603, in __call__
output = self.call(inputs, **kwargs)
File "/Users/me/anaconda3/lib/python3.6/site-packages/keras/layers/wrappers.py", line 203, in call
output_shape = self.compute_output_shape(input_shape)
File "/Users/me/anaconda3/lib/python3.6/site-packages/keras/layers/wrappers.py", line 160, in compute_output_shape
child_output_shape = self.layer.compute_output_shape(child_input_shape)
File "/Users/me/anaconda3/lib/python3.6/site-packages/keras/layers/core.py", line 852, in compute_output_shape
assert input_shape[-1]
AssertionError
the test data is Kaggle's test.csv
environment:
macos
python3.6
tensorflow 1.12.0
kesas 2.1.2
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.