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

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

@shizhediao

Description

@shizhediao

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions