基于中心对齐的领域泛化损失
class Center_loss(nn.Module):
def __init__(self,src_class):
super(Center_loss, self).__init__()
self.n_class=src_class
self.MSELoss = nn.MSELoss() # (x-y)^2
self.MSELoss = self.MSELoss.cuda()
def forward(self,
原创
2021-10-26 16:59:29 ·
339 阅读 ·
0 评论