deeplift icon indicating copy to clipboard operation
deeplift copied to clipboard

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

Open MayurDivate opened this issue 4 years ago • 2 comments

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

MayurDivate avatar Sep 25 '19 08:09 MayurDivate

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 [email protected] 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 .

AvantiShri avatar Sep 25 '19 23:09 AvantiShri

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 .

lastproxy avatar Jul 26 '21 09:07 lastproxy