Coder Social home page Coder Social logo

text-generator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

text-generator's Issues

Should X[i] and y[i] be included inside the "for" structure?

Hi Trung, I am trying to implement your code, but there is one line I couldn't understand. In the RNN_utils.py, Line 38 and Line 45. I think "X[i] = input_sequence" should be executed after the whole loop of β€œfor j in range(seq_length)” is finished. In other words, "X[i] = input_sequence" should not be included inside the "for" loop. So does y[i] in Line 45. Is my understanding right? Thanks.

Using Tensorflow

I'm trying to implement the recurrent neural network using Keras but with Tensorflow as the back-end instead of Theano. Is this possible? Any gotchas or tips/tricks are appreciated. Thank you!

Loaded Model doesn't work, can't use model for run-time predict

Tried to load the model and continue training, it seems like it starts with high loss and the model seems to be totally untrained (start over at epoch 0). The previous trained work seems to be all gone. No error message from loading. Any clue? I upgraded to Keras 2.0.8 from .6, verified the setup of the network (using the same setup code) but no help.

What are the default parameters?

Thanks for sharing.

Are the default parameters in the code the same as those used in your post?
And how large is your training data (Harry Potter series)?

Weights not loaded

Traceback (most recent call last):

],,NNVEEE,EKKkkkEKkkkqqqqqqqssqsq---rrrr!!!zKKrrrPkkzzKKkkrrKkkkrkKkkqqqqqqqssqsq---rrrr!!!zKKrrrPkk  File "C:/Users/username/AppData/Local/Programs/Python/Python36/text-generator-master/text-generator-master/recurrent_keras.py", line 54, in <module>
    model.load_weights('')
  File "C:\Users\usernameAppData\Local\Programs\Python\Python36\lib\site-packages\keras\models.py", line 721, in load_weights
    f = h5py.File(filepath, mode='r')
  File "C:\Users\username\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py\_hl\files.py", line 269, in __init__
    fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
  File "C:\Users\username\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py\_hl\files.py", line 99, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py\h5f.pyx", line 78, in h5py.h5f.open
ValueError: Invalid file name (invalid file name)

Having this error when trying to force the program to load weights. Otherwise, it defaults to epoch 0 and learning progress is lost. The program is still able to create the HDF5 files as intended, it just doesn't load them.

MemoryError with 3MB file

Running the code gives me the following error:

Data length: 3204677 characters
Vocabulary size: 94 characters
Traceback (most recent call last):
File "recurrent_keras.py", line 36, in
X, y, VOCAB_SIZE, ix_to_char = load_data(DATA_DIR, SEQ_LENGTH)
File "/home/boris/text-generator/RNN_utils.py", line 30, in load_data
X = np.zeros((len(data)/seq_length, seq_length, VOCAB_SIZE))
MemoryError

If I make the training data file smaller (e.g. 200kb) it works fine.

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.