GithubHelp home page GithubHelp logo

chatbot's Introduction

Chatbot

Included are supervised and unsupervised sentence generation models.

Seq2Seq Chatbot

The biggest component of the program is a Sequence to Sequence model for generating responses to user inputs. Supported models include GRU or LSTM encoder, decoder as well as a decoder with a global attention mechanism. The Jupyter Notebook chatbot.ipynb goes through the data downloading, generation, and processing, as well as the model definitions and training. An interface for chatting with model is provided via ipywidgets. The implementation include best practices from Neural Machine Translation such as input and output embedding weight tying, unknown token replacement, and a bidirectional encoder.

Variational Autoencoder for Sentence Generation

The second part of chatbot.ipynb is a Variational Autoencoder (VAE) for unsupervised sentence generation. The encoder and decoder for the VAE are RNNs, following Bowman et al. Generating Sentences from a Continuous Space. We also include word dropout in the decoder, and KL Divergence Annealing as in the aforementioned paper. The Variational Autoencoder is implemented with the Pyro Deep Probabilistic Programming Language, and follows the VAE implementation provided in the tutorial for Pyro very closely.

Requirements

Python 3
Jupyter Notebook
PyTorch 0.2
PyTorch Text
Pyro-ppl
NumPy
Matplotlib
tqdm

chatbot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

chatbot's Issues

i dont understand

home/acer/PycharmProjects/AA_GITHUB/chatbot-master/rnn.py:66: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
nn.init.xavier_uniform(t)
/home/acer/PycharmProjects/AA_GITHUB/chatbot-master/rnn.py:68: UserWarning: nn.init.orthogonal is now deprecated in favor of nn.init.orthogonal_.
nn.init.orthogonal(t)
/home/acer/PycharmProjects/AA_GITHUB/chatbot-master/rnn.py:70: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(t, 0)
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.
warnings.warn(warning.format(ret))

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.