Giter Site home page Giter Site logo

jungsoh / rnn-character-level-language-model Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6.38 MB

Recurrent neural network for building a character-level language model and its application to generating new dinosaur names

Python 18.83% Jupyter Notebook 81.17%
recurrent-neural-network rnn rnn-lstm character-level-language-model stochastic-gradient-descent gradient-clipping

rnn-character-level-language-model's Introduction

Recurrent neural network: Character-level language model

We build a recurrent neural network (RNN) that can generate text at the character level. We use it to generate new names for dinosaurs.

dinosaur

I did this project in the Sequence Models course as part of the Deep Learning Specialization.

Dataset

We have a list of 1536 dinosaur names compiled into a dataset that looks like:

Aachenosaurus
Aardonyx
Abdallahsaurus
Abelisaurus
Abrictosaurus
...
Zunityrannus
Zuolong
Zuoyunlong
Zupaysaurus
Zuul

To create new dinosaur names, we build a character-level language model to generate new names. The learning algorithm will learn the different name patterns, and randomly generate new names.

RNN architecture

The RNN model architecture is shown below. At each time-step, the RNN tries to predict what the next character is, given the previous characters.

rnn architecture

Generated names

Given the dataset of dinosaur names, we use each line of the dataset (one name) as one training example. At every 2000 steps of stochastic gradient descent, we sample several randomly chosen names to see how the algorithm is doing. At 22000 iterations, the generated names are:

Iteration: 22000, Loss: 22.728886

Onustreofkelus
Llecagosaurus
Mystolojmiaterltasaurus
Ola
Yuskeolongus
Eiacosaurus
Trodonosaurus

rnn-character-level-language-model's People

Contributors

jungsoh avatar

Watchers

 avatar

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.