Commit db852717 authored by yhcao6's avatar yhcao6
Browse files

format

parent bd8c14d8
...@@ -126,4 +126,3 @@ class L2Norm(nn.Module): ...@@ -126,4 +126,3 @@ class L2Norm(nn.Module):
def forward(self, x): def forward(self, x):
norm = x.pow(2).sum(1, keepdim=True).sqrt() + self.eps norm = x.pow(2).sum(1, keepdim=True).sqrt() + self.eps
return self.weight[None, :, None, None].expand_as(x) * x / norm return self.weight[None, :, None, None].expand_as(x) * x / norm
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment