Skip to content

Commit

Permalink
fixed shape for actnorm constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellALA committed Aug 18, 2023
1 parent f5690e3 commit 120c520
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions FrEIA/modules/invertible_resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def __init__(self, dims_in, dims_c=None, init_data: torch.Tensor = None):

self.register_buffer("is_initialized", torch.tensor(False))

self.log_scale = nn.Parameter(torch.empty(1, *dims_in))
self.loc = nn.Parameter(torch.empty(1, *dims_in))
dims = next(iter(dims_in))
self.log_scale = nn.Parameter(torch.empty(1, *dims))
self.loc = nn.Parameter(torch.empty(1, *dims))

if init_data is not None:
self.initialize(init_data)
Expand Down

0 comments on commit 120c520

Please sign in to comment.