We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEEP_CORAL_LOSS: def CORAL(source, target): d = source.data.shape[1] ns = source.data.shape[0] nt = target.data.shape[0]
# source covariance xm = torch.mean(source, 0, keepdim=True) - source xc = (xm.t() @ xm) / (ns-1) # target covariance xmt = torch.mean(target, 0, keepdim=True) - target xct = xmt.t() @ xmt / (nt-1) print(xc, xct) # frobenius norm between source and target loss = torch.sum(torch.mul((xc - xct), (xc - xct))) loss = loss/(4*d*d) return loss
The text was updated successfully, but these errors were encountered:
I don't understand this part, too. Do you have some idea?
Sorry, something went wrong.
tldr, no error, this code is "correct". See my answer for this issue .
No branches or pull requests
DEEP_CORAL_LOSS:
def CORAL(source, target):
d = source.data.shape[1]
ns = source.data.shape[0]
nt = target.data.shape[0]
The text was updated successfully, but these errors were encountered: