DL-Art-School/codes/models/image_generation/stylegan/__init__.py

11 lines
483 B
Python
Raw Normal View History

def create_stylegan2_loss(opt_loss, env):
type = opt_loss['type']
if type == 'stylegan2_divergence':
2022-03-16 18:04:00 +00:00
import models.image_generation.stylegan.stylegan2_lucidrains as stylegan2
2020-11-15 18:32:35 +00:00
return stylegan2.StyleGan2DivergenceLoss(opt_loss, env)
elif type == 'stylegan2_pathlen':
2022-03-16 18:04:00 +00:00
import models.image_generation.stylegan.stylegan2_lucidrains as stylegan2
2020-11-15 18:32:35 +00:00
return stylegan2.StyleGan2PathLengthLoss(opt_loss, env)
else:
raise NotImplementedError