From 9a173bf276892d8be3f12bd9e70007df5bdc4cf6 Mon Sep 17 00:00:00 2001 From: George Tamer Date: Fri, 15 Dec 2023 12:40:32 -0500 Subject: [PATCH] Assign self.norm_type to input norm_type --- fairscale/nn/model_parallel/layers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fairscale/nn/model_parallel/layers.py b/fairscale/nn/model_parallel/layers.py index 05af2c741..e27d5aa72 100644 --- a/fairscale/nn/model_parallel/layers.py +++ b/fairscale/nn/model_parallel/layers.py @@ -178,7 +178,7 @@ def __init__( self.embedding_dim = embedding_dim self.padding_idx = padding_idx self.max_norm = max_norm - self.norm_type = scale_grad_by_freq + self.norm_type = norm_type self.scale_grad_by_freq = scale_grad_by_freq self.sparse = sparse self._weight = None