jmschrei / avocado

Avocado is a multi-scale deep tensor factorization model that learns a latent representation of the human epigenome and enables imputation of epigenomic experiments that have not yet been performed.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot import name 'Adam' from 'keras.optimizers'

mingyanisa opened this issue · comments

I tried to install and use avocado on google colab but I got this error when import from avocado import Avocado

/usr/local/lib/python3.7/dist-packages/avocado/model.py in <module>()
     21 from keras.layers import Multiply, Dot, Flatten, concatenate
     22 from keras.models import Model
---> 23 from keras.optimizers import Adam
     24 
     25 def build_model(n_celltypes, n_celltype_factors, n_assays, n_assay_factors,

ImportError: cannot import name 'Adam' from 'keras.optimizers' (/usr/local/lib/python3.7/dist-packages/keras/optimizers.py)

Can we use from tensorflow.keras.optimizers import Adam instead?

Yeah, I'm sure that would work too.

Are you using the version of keras and Theano in the setup file?

Solved it. I downgrade Keras version to 2.1.0 instead. Thank you.