kundajelab / deeplift

Public facing deeplift repo
MIT License
825 stars 164 forks source link

AttributeError: module 'tensorflow' has no attribute 'placeholder' #88

Open MayurDivate opened 5 years ago

MayurDivate commented 5 years ago

HI Avanti,

I used Tensorflow 2.0 to build the model and it was saved in h5 format. But when I used convert_model_from_saved_files method as suggested in the tutorial, I get following error.

self._activation_vars = tf.placeholder(
AttributeError: module 'tensorflow' has no attribute 'placeholder'

Is it possible to use deeplift on Tensorflow 2.0 models ?

Best regards, Mayur

AvantiShri commented 5 years ago

Hi Mayur,

Unfortunately I have not updated my code to work with tensorflow 2.0 yet. But I think that if you saved your model in the keras format, then you can safely load it with deeplift if you create a virtual environment that has an earlier version of tensorflow.

On Wed, 25 Sep 2019 at 01:17, Mayur Divate notifications@github.com wrote:

HI Avanti,

I used Tensorflow 2.0 to build the model and it was saved in h5 format. But when I used convert_model_from_saved_files method as suggested in the tutorial, I get following error.

self._activation_vars = tf.placeholder( AttributeError: module 'tensorflow' has no attribute 'placeholder'

Is it possible to use deeplift on Tensorflow 2.0 models ?

Best regards, Mayur

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kundajelab/deeplift/issues/88?email_source=notifications&email_token=AARSFBWH4FMX562YSXGR3F3QLMNALA5CNFSM4I2JLBF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNQY4FA, or mute the thread https://github.com/notifications/unsubscribe-auth/AARSFBRWQTYOYXM3TMGWE6LQLMNALANCNFSM4I2JLBFQ .

lastproxy commented 3 years ago

does deeplift suppport tensorflow 2.0 now?

Hi Mayur, Unfortunately I have not updated my code to work with tensorflow 2.0 yet. But I think that if you saved your model in the keras format, then you can safely load it with deeplift if you create a virtual environment that has an earlier version of tensorflow. On Wed, 25 Sep 2019 at 01:17, Mayur Divate @.***> wrote: HI Avanti, I used Tensorflow 2.0 to build the model and it was saved in h5 format. But when I used convert_model_from_saved_files method as suggested in the tutorial, I get following error. self._activation_vars = tf.placeholder( AttributeError: module 'tensorflow' has no attribute 'placeholder' Is it possible to use deeplift on Tensorflow 2.0 models ? Best regards, Mayur — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#88?email_source=notifications&email_token=AARSFBWH4FMX562YSXGR3F3QLMNALA5CNFSM4I2JLBF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNQY4FA>, or mute the thread https://github.com/notifications/unsubscribe-auth/AARSFBRWQTYOYXM3TMGWE6LQLMNALANCNFSM4I2JLBFQ .