Giter Club home page Giter Club logo

lstm-poetry-word-based's Introduction

Similar to https://github.com/dvictor/lstm-poetry but this time, instead of characters, we represent entire words as (embedding) vectors.

Uses

TensorFlow version 0.7.1

You can download the trained NN from https://yadi.sk/d/Q0W0v-6yqxGW6
This is a rather small model, for better results you can train a larger net by adjusting the configuration parameters in train.py

Run

  • train.py train your NN using input.txt from your WORK_DIR
  • generate.py generate text

Change WORK_DIR in each file to specify your work directory.

Here's an example of output.

Input text:

green people floating
the morning has

Output:

green people floating
the morning has just begun

that's what the world has left to do
if you don't care how it's gotta be

i'd like to see you laughing at me

i can hear you say,

i can see you in the eyes of a smile
i'll be standing by your side

i can't stop the tears
with it black
i can see the white lines

can i even get your love?


Occasional <unk> in the output are caused by the limit imposed to the vocabulary size.
The vocabulary is composed of vocab_size most used words in the training set.
The words in the input that are not part of the vocabulary are encoded as <unk> so the NN will also generate some when it "feels like".

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.