Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

AttributeError: 'AdafactorOptimizer' object has no attribute 'get_gradients' #1919

Open
shizhediao opened this issue Nov 1, 2022 · 1 comment

Comments

@shizhediao
Copy link

shizhediao commented Nov 1, 2022

Hi,
When I am trying to reproduce the adafactor experiments on en-de translation task, I encountered the following issue.
AttributeError: 'AdafactorOptimizer' object has no attribute 'get_gradients'
Could any one tell me how to use adafactor optimizer? Below is my running code:

  --data_dir=t2t_data \
  --problem=translate_ende_wmt32k \
  --model=transformer \
  --hparams_set=transformer_base \
  --hparams="batch_size=1024,optimizer=adafactor" \
  --schedule=continuous_train_and_eval \
  --output_dir=translate_ende_wmt32k_adafactor \
  --train_steps=300000 \
  --worker_gpu=10 \
  --eval_steps=100

Thanks!

@shizhediao
Copy link
Author

fixed by commenting out line 241 and use line 245

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant