Skip to content

DeepNorm question #145

@ezeli

Description

@ezeli

self.layer_norm = LayerNorm(normalized_shape, eps=eps, elementwise_affine=elementwise_affine)

The self.layer_norm is not used in the forward function. And the self.alpha should be multiplied by x, not gx.

The correct forward function might be:

def forward(self, x: torch.Tensor, gx: torch.Tensor):
    return self.layer_norm(self.alpha * x + gx)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions