aspuru-guzik-group / chemical_vae

Code for 10.1021/acscentsci.7b00572, now running on Keras 2.0 and Tensorflow
Apache License 2.0
479 stars 178 forks source link

chemical_vae install #2

Open mitangguoguon opened 6 years ago

mitangguoguon commented 6 years ago

Hi all, I have installed chemical_vae by the following commands:**

"~/anaconda2/bin/pip install -r requirements.txt ~/anaconda2/bin/conda env create -f environment.yml source ~/anaconda2/bin/activate chemvae python setup.py install"

When I enter the instruction "python -m chemvae.train_vae", It gives the following errors:

_"/home/lili/anaconda2/envs/chemvae/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6 return f(*args, **kwds) /home/lili/anaconda2/envs/chemvae/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Using Theano backend. Traceback (most recent call last): File "/home/lili/anaconda2/envs/chemvae/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/lili/anaconda2/envs/chemvae/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/lili/Programs/chemical_vae-master/chemvae/train_vae.py", line 30, in from .models import encoder_model, load_encoder File "/home/lili/Programs/chemical_vae-master/chemvae/models.py", line 10, in from .tgru_k2_gpu import TerminalGRU File "/home/lili/Programs/chemical_vae-master/chemvae/tgru_k2gpu.py", line 72, in raise NotImplemented("Backend not implemented") TypeError: 'NotImplementedType' object is not callable"

How can I solve this problem? Thank you very much.

jnwei-zz commented 6 years ago

The issue is due to the fact that one of the layers has only been written in Tensorflow (and not Theano). Please set the Keras backend to Tensorflow and it should work.

Nilay27 commented 5 years ago

"export KERAS_BACKEND=tensorflow" command in the terminal will do.

Minyoung1102 commented 2 years ago

i have the same issue, did you fix the error?