Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing an error #6

Open
vinayakumarr opened this issue Jun 16, 2017 · 5 comments
Open

Showing an error #6

vinayakumarr opened this issue Jun 16, 2017 · 5 comments

Comments

@vinayakumarr
Copy link

How to correct the error. For detailed, please see the attached image

keras version 1.2.0
Theano version 0.8.2
untitled

@vinayakumarr
Copy link
Author

This is because the the json files are loaded in a different version of theano and keras, So when i try to execute the training program, the program is working properly.

@vinayakumarr
Copy link
Author

When i tireid to run the sudo python train_autoencoder.py, after 38 epochs i am getting the following below error. How to correct this?
I am using Version: 0.9.0.dev2 and keras Version: 1.1.1
File "train_autoencoder.py", line 301, in
limit=args.limit) # just train on first 5000 molecules for quick testing. set to None to use all 250k
File "train_autoencoder.py", line 275, in main
show_accuracy=True)
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 627, in fit
sample_weight=sample_weight)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1124, in fit
callback_metrics=callback_metrics)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 862, in _fit_loop
callbacks.on_epoch_end(epoch, epoch_logs)
File "/usr/local/lib/python2.7/dist-packages/keras/callbacks.py", line 42, in on_epoch_end
callback.on_epoch_end(epoch, logs)
File "train_autoencoder.py", line 126, in on_epoch_end
index = sample(j, TEMPERATURE)
File "train_autoencoder.py", line 44, in sample
return np.argmax(np.random.multinomial(1, a, 1))
File "mtrand.pyx", line 4593, in mtrand.RandomState.multinomial (numpy/random/mtrand/mtrand.c:37541)
ValueError: sum(pvals[:-1]) > 1.0

@wadekun
Copy link

wadekun commented Aug 7, 2017

maybe you should install keras from here: https://github.com/rgbombarelli/keras
you should uninstall keras currently: pip uninstall keras, then

  1. git clone https://github.com/rgbombarelli/keras.git
  2. cd keras
  3. python setup.py install

@xuzhang5788
Copy link

When I tried to run sample_autoencoder.py, I got the following error message.

Using Theano backend.
Using gpu device 0: GeForce GTX 1070 (CNMeM is enabled with initial size: 80.0% of memory, cuDNN 5005)
Traceback (most recent call last):
File "sample_autoencoder.py", line 96, in
model = model_from_json(json.dumps(model_dict))
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 210, in model_from_json
return layer_from_config(config, custom_objects=custom_objects)
File "/usr/local/lib/python2.7/dist-packages/keras/utils/layer_utils.py", line 26, in layer_from_config
class_name = config['class_name']
KeyError: 'class_name'

@xuzhang5788
Copy link

When I ran train_autoencoder.py, after 100 epoches, I got val_loss: 0.9318 - val_acc: 0.7127, not like you said "Loss: 0.834809958935, Accuracy: 0.948206666667"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants