Giter Site home page Giter Site logo

vipinindkumar / text-generation Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.65 MB

Text generation from a Recurrent Neural Network trained on 'The Ramayana of Valmiki'

Jupyter Notebook 100.00%
recurrent-neural-networks lstm text-generation ramayana

text-generation's Introduction

Text Generation

Text generation from a Recurrent Neural Network trained on English translated version of "The Ramayana of Valmiki, translated by Hari Prasad Shastri"


Epoch 5/20

2532/2532 [==============================] - 331s 131ms/step - loss: 1.1127

####################

Temperature: 0.2

####################

on of the sages, the titans and the powerful Ravana and the son of Dasaratha, who was able to disport the son of Dasaratha and the son of Dasaratha and the monkeys and the son of Dasaratha and the foremost of the Rakshasas and the son of Ravana's heart and the sun and the son of the Wind-god

of Dasaratha and the son of Vayu, the son of Dasaratha, who was subject to the sun and the son of Dasaratha and Shri Ramachandra and the son of the Gods, the King of the Monkeys, who was able to change the sun and the sun in the presence of the forest and the head of the powerful Ravana and

and the son of Dasaratha and the sun and the son of Dasaratha and the son of Vasava, the King of the Monkeys, having set out from the sun and arrows and the son of the Wind-god and the titans with the army of the sun and the son of Dasaratha, the son of Dasaratha and having slain the monkeys


Epoch 20/20

2532/2532 [==============================] - 332s 131ms/step - loss: 0.9149

####################

Temperature: 1.0

####################

able to deep like a lion, made calamity bore the terror of his anger. Having accepted these words of Raghava, many deceiting flowering battle. On none hanging his instruction and great intellect with thy grief! It was formerly. Now Bharata and cross their lives four departure. The prowess of roya

icate tones, Manu whose boon must take heart, this is help to the titans in seas for shouting, lay possessed of himself with con-litulat ever bestowed on him; therefore, provoked youth and in words with joined palms, said :- cc This matter none were mine own abode. None were mastered with their

s, ascended a celestial partike, cut forth, whether he bears the scent of this toward and again, the aged titan among the sacrificial fires of my opposi- ity, would not listen, between the Goddess Poulastya and their leaders, in a brahmin of which I will destroy the kine and the third was fil


Model, library and parameters used:

textgen = textgenrnn(name='Ramayan RNN')

train_function = textgen.train_from_largetext_file

train_function(file_path='ram.txt',
              new_model=True,
              num_epochs=train_cfg['num_epochs'],
              gen_epochs=train_cfg['gen_epochs'],
              batch_size=1024,
              train_size=train_cfg['train_size'],
              validation=train_cfg['validation'],
              rnn_layers=model_cfg['rnn_layers'],
              rnn_size=model_cfg['rnn_size'],
              rnn_bidirectional=model_cfg['rnn_bidirectional'],
              max_length=model_cfg['max_length'],
              dim_embeddings=100)
model_cfg = {'rnn_size': 128,
            'rnn_layers': 3,
            'rnn_bidirectional': True,
            'max_length': 30}

train_cfg = {'num_epochs': 20,
            'gen_epochs': 5,
            'train_size': 0.9,
            'validation': True}

text-generation's People

Contributors

vipinindkumar avatar

Watchers

 avatar  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.