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

Getting tables.exceptions.HDF5ExtError: HDF5 error back trace #68

Open
vinayakumarr opened this issue Jun 17, 2017 · 9 comments
Open

Getting tables.exceptions.HDF5ExtError: HDF5 error back trace #68

vinayakumarr opened this issue Jun 17, 2017 · 9 comments

Comments

@vinayakumarr
Copy link

When I tried to run a program by executing python preprocess.py data/smiles_50k.h5 data/processed.h5. it is generating an error.
The detailed error is attached in the image. How to correct this?
untitled

@alainrichardt
Copy link

Because the files are larger than 50MB, they are stored with git lfs

You need to install git lfs https://git-lfs.github.com/

then run

git lfs get

to download the files

@vinayakumarr
Copy link
Author

Now it is giving different error when i tried to run the

sudo python train.py data/processed.h5 model.h5 --epochs 20

Using Theano backend.
Traceback (most recent call last):
File "train.py", line 65, in
main()
File "train.py", line 43, in main
model.create(charset, latent_rep_size = args.latent_dim)
File "/home/sachin/vinay/chemistry/keras-molecules/molecules/model.py", line 23, in create
_, z = self._buildEncoder(x, latent_rep_size, max_length)
File "/home/sachin/vinay/chemistry/keras-molecules/molecules/model.py", line 81, in _buildEncoder
return (vae_loss, Lambda(sampling, output_shape=(latent_rep_size,), name='lambda')([z_mean, z_log_var]))
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 585, in call
output = self.call(inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 659, in call
return self.function(inputs, **arguments)
File "/home/sachin/vinay/chemistry/keras-molecules/molecules/model.py", line 68, in sampling
epsilon = K.random_normal(shape=(batch_size, latent_rep_size), mean=0., std = epsilon_std)
TypeError: random_normal() got an unexpected keyword argument 'std'

@alainrichardt
Copy link

This is due to a change in the Keras API, the parameter std has been changed to std_dev

Change the code and submit a pull request :)

@vinayakumarr
Copy link
Author

vinayakumarr commented Jun 21, 2017

Yes, I had corrected. I think you are using data and label as same in both train and test (in train.py line n0=54). Why? Also, you are giving the testing data as validation data? Is there any separate program to calculate the accuracy on test data set? I want to know whether the code does a classification or prediction?

According to me it is a kind of prediction, am i right?

@alainrichardt
Copy link

I'm a lurker in this repo - I dont use the train/test code

@pechersky
Copy link
Collaborator

pechersky commented Jun 21, 2017 via email

@delton137
Copy link

delton137 commented Jul 27, 2017

For the record, if you are using the latest version of TensorFlow with Keras, the API has changed std => stddev

@dtchang
Copy link

dtchang commented Oct 26, 2017

One way to resolve the exception is to checkout / download / replace the data files.

@vinayakumarr
Copy link
Author

Getting an error, when I tried to run

python preprocess.py data/smiles_500k.h5 data/processed_500.h5

File "preprocess.py", line 85, in
main()
File "preprocess.py", line 72, in main
apply_fn=lambda ch: np.array(map(one_hot_encoded_fn,
File "preprocess.py", line 63, in create_chunk_dataset
chunks=tuple([chunk_size]+list(dataset_shape[1:])))
File "/home/vinay/chemistrytensor/local/lib/python2.7/site-packages/h5py/_hl/group.py", line 105, in create_dataset
dsid = dataset.make_new_dset(self, shape, dtype, data, **kwds)
File "/home/vinay/chemistrytensor/local/lib/python2.7/site-packages/h5py/_hl/dataset.py", line 76, in make_new_dset
if isinstance(chunks, tuple) and (-numpy.array([ i>=j for i,j in zip(tmp_shape,chunks) if i is not None])).any():
TypeError: The numpy boolean negative, the - operator, is not supported, use the ~ operator or the logical_not function instead.
untitled

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

5 participants