Skip to content

Commit

Permalink
Merge pull request #51 from plutoyuxie/master
Browse files Browse the repository at this point in the history
NICECouplingBlock.jacobian()
  • Loading branch information
ardizzone authored Feb 2, 2021
2 parents c5fe1af + 550257b commit 979f6b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions FrEIA/modules/coupling_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def __init__(self, dims_in, dims_c=[], subnet_constructor=None):
self.split_len1 = channels // 2
self.split_len2 = channels - channels // 2

assert all([dims_c[i][1:] == dims_in[0][1:] for i in range(len(dims_c))]), \
# assert all([dims_c[i][1:] == dims_in[0][1:] for i in range(len(dims_c))]), \
assert all([tuple(dims_c[i][1:]) == tuple(dims_in[0][1:]) for i in range(len(dims_c))]), \
"Dimensions of input and one or more conditions don't agree."
self.conditional = (len(dims_c) > 0)
condition_length = sum([dims_c[i][0] for i in range(len(dims_c))])
Expand All @@ -45,7 +46,7 @@ def forward(self, x, c=[], rev=False):

return [torch.cat((y1, y2), 1)]

def jacobian(self, x, rev=False):
def jacobian(self, x, c=[], rev=False):
return 0

def output_dims(self, input_dims):
Expand Down

0 comments on commit 979f6b1

Please sign in to comment.