Skip to content

Commit b23a412

Browse files
author
‘whl’
committed
polish
1 parent b9c7df7 commit b23a412

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ding/model/template/language_transformer.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ def __init__(
5050
self.model = AutoModelForTokenClassification.from_pretrained(model_name)
5151
in_channel = hidden_dim if not add_linear else embedding_size
5252
self.value_head = nn.Linear(in_channel, 1)
53-
self.norm = nn.Identity() if not norm_embedding else nn.LayerNorm(normalized_shape=in_channel)
53+
self.norm = nn.Identity() if not norm_embedding else nn.LayerNorm(
54+
normalized_shape=in_channel, elementwise_affine=False
55+
)
5456

5557
# Freeze transformer encoder and only train the linear layer
5658
if freeze_encoder:

0 commit comments

Comments
 (0)