You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Anaconda2\python.exe F:/MyProject_20151101/ChinesePoemRNN/src/model.py
Using Theano backend.
Traceback (most recent call last):
File "F:/MyProject_20151101/ChinesePoemRNN/src/model.py", line 125, in
label = to_categorical([i - 1 for i in label])
File "c:\python_dev\keras-1.0.3\keras\utils\np_utils.py", line 14, in to_categorical
Y = np.zeros((len(y), nb_classes))
MemoryError
The text was updated successfully, but these errors were encountered:
I think the reason is your ram is not enough, I used a desktop with 32g ram, and it works fine. I think there are 2 ways: 1) change to another computer 2) modify the code to stream read the data.
@hx364 By the way, there are some errors in your repository because of carelessness.
Missing 'return model' in the definition of function train_model
Forget to define 'char_to_index' and 'index_to_char' as global names, which will be used in function 'make_poem_index'. Define them outside the main function or pass it to function 'make_poem_index' as a parameter.
C:\Anaconda2\python.exe F:/MyProject_20151101/ChinesePoemRNN/src/model.py
Using Theano backend.
Traceback (most recent call last):
File "F:/MyProject_20151101/ChinesePoemRNN/src/model.py", line 125, in
label = to_categorical([i - 1 for i in label])
File "c:\python_dev\keras-1.0.3\keras\utils\np_utils.py", line 14, in to_categorical
Y = np.zeros((len(y), nb_classes))
MemoryError
The text was updated successfully, but these errors were encountered: