#https://github.com/yunjey/stargan/blob/master/solver.py
def gradient_penalty(self, y, x):
"""Compute gradient penalty: (L2_norm(dy/dx) - 1)**2."""
weight = torch.ones(y.size()).to(self.<
WGAN-GP 关键源码
最新推荐文章于 2023-10-08 10:51:04 发布