google-research / electra

ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
Apache License 2.0
2.33k stars 352 forks source link

no module named tensorflow.contrib #122

Open sprajagopal opened 3 years ago

sprajagopal commented 3 years ago

On running:

python run_pretraining.py --data-dir data --model-name electra_small

it exits with the following error:

   from tensorflow.contrib import layers as contrib_layers
ModuleNotFoundError: No module named 'tensorflow.contrib'

Is this issue related to tf1 vs tf2 or is this something else?

nbroad1881 commented 3 years ago

https://github.com/google-research/electra#requirements

TensorFlow 1.15 (although we hope to support TensorFlow 2.0 at a future date)