Code Monkey home page Code Monkey logo

Comments (8)

adeshpande3 avatar adeshpande3 commented on September 13, 2024 1

Yeah I would assume that's the issue. With problems like these, the issue could stem from a number of different places (not enough training data, too small/big of a model, not training enough, wrong hyperparameters, etc) so it's tough to really tell what a fix is.

To try to improve the performance, a useful exercise could be to try training the model on a smaller subset of the training data (lets say 100 or so conversations) and then training the model and making sure that the bot is able to respond correctly to just those convos. If it's not able to learn it, then you know that there's probably some problem with your model architecture, hyperparameters, etc

from facebook-messenger-bot.

adeshpande3 avatar adeshpande3 commented on September 13, 2024

So, you've trained your model and you have it saved in your models folder, correct? If so, double check that you have a file structure like this.

models

Are you getting this error when you try to run saver.restore(sess, tf.train.latest_checkpoint('models/'))?

from facebook-messenger-bot.

lisanka93 avatar lisanka93 commented on September 13, 2024

yes file structure is correct :)
and yes I get the error if i run saver.restore etc.

from facebook-messenger-bot.

adeshpande3 avatar adeshpande3 commented on September 13, 2024

Okay so that error normally occurs when the graph you save is different from the graph you've defined. Double check to make sure that the shapes of all your variables are the same as the graph you saved, same number of LSTM units, etc. From your error, I'm fairly certain it has something to do with the number of LSTM units. Try increasing/decreasing that number to figure out if "lhs shape=[192] rhs shape=[448]" changes.

Also, when you run the saver.restore function, you don't have to run sess.run(tf.global_variables_initializer()) since the values for the variables are being loaded in. Try removing that.

from facebook-messenger-bot.

lisanka93 avatar lisanka93 commented on September 13, 2024

THANK YOU!!! yes it was that!

from facebook-messenger-bot.

lisanka93 avatar lisanka93 commented on September 13, 2024

and my last question is
if the chatbot doesnt have a response (list of responses is 0) is there a change to make it learn those?

from facebook-messenger-bot.

adeshpande3 avatar adeshpande3 commented on September 13, 2024

By list of responses, do you mean that the call to idsToSentence always returns a list thats empty? What do you get when you just print the ids variable? Is it just padding and EOS tokens?

from facebook-messenger-bot.

lisanka93 avatar lisanka93 commented on September 13, 2024

so it works but once in a while it crashes and I assume that for this statement the model doesnt have a reply

from facebook-messenger-bot.

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.