bert_experimental icon indicating copy to clipboard operation
bert_experimental copied to clipboard

Run into issue in step 2:

Open Nasnl opened this issue 5 years ago • 7 comments

Hi, Running the colab lets me encounter an issue in step 2: module 'tensorflow' has no attribute 'InteractiveSession'

Any ideas to solve that one to be able to move on?

Nasnl avatar Sep 24 '20 07:09 Nasnl

Good day! What's tf version are you use?

чт, 24 сент. 2020 г., 10:52 Nas [email protected]:

Hi, Running the colab lets me encounter an issue in step 2: module 'tensorflow' has no attribute 'InteractiveSession'

Any ideas to solve that one to be able to move on?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gaphex/bert_experimental/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCXNP25L4JAAFOBUWQPTW3SHL3ERANCNFSM4RX66DRA .

Ab1992ao avatar Sep 24 '20 08:09 Ab1992ao

The first idea it's non relevant tf version. tf 1.x are relevant for this. tf2.x versions don't supported now.

Ab1992ao avatar Sep 25 '20 08:09 Ab1992ao

Tx for the response @Ab1992ao . I just used your colab, so that's why I expected that to be set right. I'll check if I can change the colab code to use only tf 1.x.

Nasnl avatar Sep 25 '20 09:09 Nasnl

I actually see that it is not 'your' colab at all. Sorry for that. I'm talking about https://colab.research.google.com/drive/1ra7zPFnB2nWtoAc0U5bLp0rWuPWb6vu4 which refers to your repository in https://towardsdatascience.com/building-a-search-engine-with-bert-and-tensorflow-c6fdc0186c8a with this quote 'The code for this experiment is available in Colab here.' and I assumed it was 'your colab'... but that's not the case.... Ok, I'll see if I can tweak the code in the colab to make it work ;-)

Nasnl avatar Sep 25 '20 09:09 Nasnl

@Nasnl tf version in colab 2.3.0. The paper has written for tf 1.x. Tf 2x has been released after this paper. Sorry. We working about support tf2 version now.

Ab1992ao avatar Sep 25 '20 09:09 Ab1992ao

@Nasnl You can install tf 1.15 instead tf2x into your colab notebook or try to use next command: import tensorflow.compat.v1 as tf

Ab1992ao avatar Sep 25 '20 09:09 Ab1992ao

@Ab1992ao I'll try that. Thanks for your support!

Nasnl avatar Sep 25 '20 09:09 Nasnl