From e367ac469c27949854a08c5c5ba5b392c3fbcb0a Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Thu, 8 Aug 2019 11:26:11 -0400 Subject: [PATCH] [RoBERTa] Re-apply 39d72bcc7b2c99c04b6f483f0d8e7bdff547d37c cc @lysandrejik --- pytorch_transformers/convert_roberta_checkpoint_to_pytorch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_transformers/convert_roberta_checkpoint_to_pytorch.py b/pytorch_transformers/convert_roberta_checkpoint_to_pytorch.py index 85ad5ad15b..e4e8fbb25d 100644 --- a/pytorch_transformers/convert_roberta_checkpoint_to_pytorch.py +++ b/pytorch_transformers/convert_roberta_checkpoint_to_pytorch.py @@ -132,7 +132,7 @@ def convert_roberta_checkpoint_to_pytorch(roberta_checkpoint_path, pytorch_dump_ model.lm_head.layer_norm.weight = roberta.model.decoder.lm_head.layer_norm.weight model.lm_head.layer_norm.bias = roberta.model.decoder.lm_head.layer_norm.bias model.lm_head.layer_norm.variance_epsilon = roberta.model.decoder.lm_head.layer_norm.eps - model.lm_head.weight = roberta.model.decoder.lm_head.weight + model.lm_head.decoder.weight = roberta.model.decoder.lm_head.weight model.lm_head.bias = roberta.model.decoder.lm_head.bias # Let's check that we get the same results.