Giter Club home page Giter Club logo

Comments (5)

jugador avatar jugador commented on September 28, 2024 4

While training the model I am getting the error
InvalidArgumentError (see above for traceback): Incompatible shapes: [80,1] vs. [160,1] [[Node: prediction/logistic_loss/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](prediction/Squeeze, prediction/ToFloat)]]
I am running it with python3, any idea what might be causing the issue?

from chatbot-retrieval.

davideboschetto avatar davideboschetto commented on September 28, 2024 3

same error for me.

tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [80,1] vs. [160,1]
[[Node: prediction/logistic_loss/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](prediction/Squeeze, prediction/ToFloat)]]

from chatbot-retrieval.

craymichael avatar craymichael commented on September 28, 2024

I just had this strange issue as well. Occurred after calling evaluate on a just-trained Estimator passing in the following metrics dict:

{'auc': <function streaming_auc at 0x49226e0>, 'recall': <function streaming_recall at 0x49225f0>,  'precision': <function streaming_precision at 0x4922578>, 'confusion_matrix': <function confusion_matrix at 0x4730d70>, 'accuracy': <function streaming_accuracy at 0x4922500>}

Traceback is below:

Traceback (most recent call last):
  File "main.py", line 301, in <module>
    tf.app.run()
  File "/usr/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "main.py", line 220, in main
    eval_steps=1
  File "/opt/projects/tensorflow/cross_validation/evaluate.py", line 54, in evaluate
    metrics=metrics
  File "/usr/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 356, in evaluate
    name=name)
  File "/usr/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 641, in _evaluate_model
    max_steps=steps)
  File "/usr/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/graph_actions.py", line 773, in evaluate
    _write_summary_results(output_dir, eval_results, current_global_step)
  File "/usr/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/graph_actions.py", line 613, in _write_summary_results
    _eval_results_to_str(eval_results))
  File "/usr/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/graph_actions.py", line 607, in _eval_results_to_str
    return ', '.join('%s = %s' % (k, v) for k, v in eval_results.items())
AttributeError: 'NoneType' object has no attribute 'items'

from chatbot-retrieval.

craymichael avatar craymichael commented on September 28, 2024

Never mind, this is a direct result from having a model that hasn't been trained, i.e. no weights or other variables saved. This can result from trying to use training files that don't exist when fit is called. If you need help debugging this, use tf.logging.set_verbosity(tf.logging.DEBUG) and look at the logs carefully to see what's going on. The Estimator will not fail due to user misconfiguration

from chatbot-retrieval.

 avatar commented on September 28, 2024

Some error for me.
InvalidArgumentError (see above for traceback): Incompatible shapes: [80,1] vs. [160,1]
[[Node: prediction/logistic_loss/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](prediction/Squeeze, prediction/ToFloat)]]

from chatbot-retrieval.

Related Issues (20)

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.