Giter Site home page Giter Site logo

Comments (16)

Sangheli avatar Sangheli commented on June 3, 2024 6

if move in udc_model.py

batch_size = targets.get_shape().as_list()[0]

to

if mode == tf.contrib.learn.ModeKeys.EVAL:
_____batch_size = targets.get_shape().as_list()[0]

code work correctly on tf 0.12 in predict mode, but you need change call of predict function, as in example https://github.com/Sangheli/chatbot-retrieval/blob/master/udc_predict.py#L68
without flag as_iterable

from chatbot-retrieval.

jugador avatar jugador commented on June 3, 2024 4

In my case I changed both.
In udc_hparams.py
tf.flags.DEFINE_integer("batch_size", 64, "Batch size during training") tf.flags.DEFINE_integer("eval_batch_size", 8, "Batch size during evaluation")
In udc_test.py
tf.flags.DEFINE_integer("test_batch_size", 8, "Batch size for testing")

After that it started working. I had to rerun the train script. Also I changed my tf to version .11

from chatbot-retrieval.

Sangheli avatar Sangheli commented on June 3, 2024

for udc_test.py you can set test_batch_size to 8, as a batch_size in udc_hparams.py
https://github.com/dennybritz/chatbot-retrieval/blob/master/udc_test.py#L15

from chatbot-retrieval.

rtbins avatar rtbins commented on June 3, 2024

Sangheli thanks, it worked, but now while running udc_predict.py am getting error
File "/usr/local/lib/python3.5/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1047, in _call_model_fn model_fn_results = self._model_fn(features, labels, mode=mode) File "/home/rohitg/Documents/chatbot-retrieval-master/udc_model.py", line 29, in model_fn batch_size = targets.get_shape().as_list()[0] AttributeError: 'dict' object has no attribute 'get_shape'

from chatbot-retrieval.

Sangheli avatar Sangheli commented on June 3, 2024

wich version of tensorflow you use? in tensorflow 0.11 all works correct (python 3.5)

from chatbot-retrieval.

rtbins avatar rtbins commented on June 3, 2024

The version am using is 0.12.0 and python 3.5

from chatbot-retrieval.

Sangheli avatar Sangheli commented on June 3, 2024

i have some problems while running this code in tf 0.12 or 0.10

from chatbot-retrieval.

rtbins avatar rtbins commented on June 3, 2024

Do I need to switch to .11?

from chatbot-retrieval.

Sangheli avatar Sangheli commented on June 3, 2024

yes, this helped me

from chatbot-retrieval.

rtbins avatar rtbins commented on June 3, 2024

Do I need to train data again or I can use the same output data there?

from chatbot-retrieval.

Sangheli avatar Sangheli commented on June 3, 2024

I don't know, I'm trained every time I trying to solve problems, on gt 770 4gb train time about 1-2 hours(16 000 steps), to get perfect results on ubuntu text corpus, in other issues author says he train 2000 steps, to get good result

from chatbot-retrieval.

rtbins avatar rtbins commented on June 3, 2024

Thanks for helping me out :D

from chatbot-retrieval.

rtbins avatar rtbins commented on June 3, 2024

Cool it worked with .11, I wonder what is the prob with .12

from chatbot-retrieval.

basma-b avatar basma-b commented on June 3, 2024

@Sangheli please I am getting the same error on training, should I change batch_size or eval_batch_size in udc_hparams.py to 8 and test_batch_size in udc_test.py to 8 too ?

from chatbot-retrieval.

hunkim avatar hunkim commented on June 3, 2024

Can any of you make a pull request to fix this issue?

from chatbot-retrieval.

yogesh-0586 avatar yogesh-0586 commented on June 3, 2024

udc_predict.py return only POTENTIAL_RESPONSES zero position value

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.