Skip to content

Commit

Permalink
correct order of if
Browse files Browse the repository at this point in the history
  • Loading branch information
hpasapp committed Dec 15, 2020
1 parent e9d6ed2 commit 7e4c758
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sru/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ def __init__(self,
self.layer_norm: Optional[nn.Module]= None
if layer_norm:
if post_ln:
self.layer_norm = nn.LayerNorm(self.input_size)
else:
self.layer_norm = nn.LayerNorm(self.output_size)
else:
self.layer_norm = nn.LayerNorm(self.input_size)

self.reset_parameters()

Expand Down

0 comments on commit 7e4c758

Please sign in to comment.