You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your reply, I modified it according to your description, but it brought another error.
If I use AffineAdapterNaive instead of AffineAdapterSigmoid, it works.
Btw, if you still want to use the AffineAdapterSigmoid with the AffineCoupling, you can use the following modified AffineAdapterSigmoid implemention, which should fix your error:
classAffineAdapterSigmoidModified(torch.nn.Module):
""" Sigmoid based affine adapter, modified to work for 2 dimensional outputs Partitions the output h of f(x) = h into s and t by extracting every odd and even channel Outputs sigmoid(s), t """def__init__(self, module):
super(AffineAdapterSigmoidModified, self).__init__()
self.f=moduledefforward(self, x):
h=self.f(x)
asserth.shape[1] %2==0# nosecscale=torch.sigmoid(h[:, 1::2] +2.0)
shift=h[:, 0::2]
returnscale, shift
Btw, if you still want to use the
AffineAdapterSigmoid
with theAffineCoupling
, you can use the following modifiedAffineAdapterSigmoid
implemention, which should fix your error:Originally posted by @silvandeleemput in #63 (comment)
The text was updated successfully, but these errors were encountered: