HIPS / molecule-autoencoder

A project to enable optimization of molecules by transforming them to and from a continuous representation.
154 stars 52 forks source link

Showing an error #6

Open vinayakumarr opened 7 years ago

vinayakumarr commented 7 years ago

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

keras version 1.2.0 Theano version 0.8.2 untitled

vinayakumarr commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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 commented 6 years ago

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"