add definition of scale for GPT

pull/8725/head
alouhahaha 4 years ago
parent 37a722fe77
commit 641888f603

@ -361,6 +361,7 @@ class Block(nn.Cell):
"""
def __init__(self, config, layer_idx):
super(Block, self).__init__()
scale = 1.0
self.layernorm1 = LayerNorm((config.embedding_size,)).to_float(config.compute_dtype)
self.attention = Attention(config, scale, layer_idx)
self.layernorm2 = LayerNorm((config.embedding_size,)).to_float(config.compute_dtype)

Loading…
Cancel
Save