Coder Social home page Coder Social logo

yuhsinliu1993 / quora_questionpairs_dl Goto Github PK

View Code? Open in Web Editor NEW
54.0 6.0 17.0 34.22 MB

Kaggle Competition: Using deep learning to solve quora's question pairs problem

Python 98.27% Shell 1.73%
keras spacy kaggle-competition nlp-machine-learning deep-learning

quora_questionpairs_dl's Issues

[ERROR]AssertionError

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

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.