Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'tensorflow._api.v2.train' has no attribute 'Optimizer' #16

Open
alvynabranches opened this issue Sep 25, 2024 · 0 comments

Comments

@alvynabranches
Copy link

Command

python IndicBERT/train/run_pretraining.py \
--input_file=/content/drive/MyDrive/6000Sentences/TrainingEnglish/input.txt \
--output_dir=/content/drive/MyDrive/6000Sentences/TrainingEnglish/mlm_data.txt \
--do_train=True \
--bert_config_file=/content/drive/MyDrive/6000Sentences/TrainingEnglish/output_tokenizer/tokenizer_config.json \
--train_batch_size=4096 \
--max_seq_length=5 \
--max_predictions_per_seq=4 \
--num_train_steps=1000000 \
--num_warmup_steps=10000 \
--learning_rate=5e-4 \
--save_checkpoints_steps=100000

Error

Traceback (most recent call last):
  File "/content/IndicBERT/train/run_pretraining.py", line 23, in <module>
    import optimization
  File "/content/IndicBERT/train/optimization.py", line 87, in <module>
    class AdamWeightDecayOptimizer(tf.train.Optimizer):
AttributeError: module 'tensorflow._api.v2.train' has no attribute 'Optimizer'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant