Closed analyzehim closed 6 years ago
What version of keras are you using?
run python
, and then
import keras
keras.__version__
you may need to update keras...
My keras Version is 1.2.2. Should I use a 2.1.2 version?
before you update keras; try this:
on line 272; where it says
model.fit(np.array(x_data), np.array(y_data),
batch_size=2,
epochs=5,
verbose=1)
change epochs=5,
to nb_epoch=5,
- i think that might work with your version
At first, I try you assumption (epochs -> nb_epochs), get the same error. After that, I updated keras to 2.1.2 (numpy to 1.13.3), and get this:
Using TensorFlow backend.
Traceback (most recent call last):
File "model.py", line 300, in
here - it works on my machine and these are my versions of everything
python 2.7 keras 2.0.8 tensorflow 1.4.1 numpy 1.13.0
I'm sorry that this isn't the most helpful response - but I don't know what else to try except for installing these versions of the packages and running the program then.
Hmmm... Thanks for the answer, anyway! Could you give me the CPU/GPU/RAM/HDD characteristic of your machie, please?
I run you neural network on very weak virtual machine, maybe this is the reason.
I developed / tested this on a super old thinkpad - right now it's running on my work computer which is pretty beefy (I work at NVIDIA right now) - so I've got 2 titans, an i7, and 64 gb of ram... hold up let me get an old commit you could run on your computer...
if you have tensorflow_gpu installed; I'd say uninstall that with pip uninstall tensorflow-gpu
and then do pip install tensorflow
so it will run on your CPU...
Virtual machine could be something to do with it, especially if you're trying to use tf gpu...
try to use the version here; before i did the keras rewrite i wrote it in pybrain, so you'll have to install all the stuff in requirements.txt with pip -r install requirements.txt
(i think), but you could run this version on a toaster;
https://github.com/robbiebarrat/rapping-neural-network/tree/d1d341dd6f46263f790a3dc5c65a70d9a4eb0492
it just nb_epoch=20 dont add the s at the end.
Hello! Thanks for you work, it's really nice (especcially a idea of generating kanye songs :) )
But i have a trouble, I'm trying to training model (by
python model
), and afterAlright, building the list of all the rhymes
and show all bigram, get this:_Traceback (most recent call last): File "model.py", line 300, in
main(depth, trainmode)
_File "model.py", line 290, in main
train(x_data, ydata, model)
File "model.py", line 273, in train
verbose=1)
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 661, in fit
str(kwargs))
TypeError: Received unknown keyword arguments: {'epochs': 5}
My environment: Ubuntu 64bit, Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]