"vscode:/vscode.git/clone" did not exist on "c0ad874a6ec867312cb262fe577b537ca1733f9a"
Commit 9bf0f107 authored by alexeib's avatar alexeib Committed by Facebook Github Bot
Browse files

fix defaults for layer drop things (#918)

Summary:
recent layerdrop related changes break existing models because they assume presence of certain args
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/918

Reviewed By: huihuifan

Differential Revision: D18578572

Pulled By: alexeib

fbshipit-source-id: 368c2d5b3add55864bf59516820807303aac6001
parent 6f7b7d20
......@@ -383,6 +383,8 @@ def base_architecture(args):
args.attention_dropout = getattr(args, 'attention_dropout', 0.1)
args.activation_dropout = getattr(args, 'activation_dropout', 0.0)
args.pooler_dropout = getattr(args, 'pooler_dropout', 0.0)
args.encoder_layers_to_keep = getattr(args, 'encoder_layers_to_keep', None)
args.encoder_layerdrop = getattr(args, 'encoder_layerdrop', 0.0)
@register_model_architecture('roberta', 'roberta_base')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment