DL-Art-School/codes/models/stylegan/__init__.py
James Betker 92f9a129f7 GLEAN!
2020-12-18 16:04:19 -07:00

11 lines
449 B
Python

def create_stylegan2_loss(opt_loss, env):
type = opt_loss['type']
if type == 'stylegan2_divergence':
import models.stylegan.stylegan2_lucidrains as stylegan2
return stylegan2.StyleGan2DivergenceLoss(opt_loss, env)
elif type == 'stylegan2_pathlen':
import models.stylegan.stylegan2_lucidrains as stylegan2
return stylegan2.StyleGan2PathLengthLoss(opt_loss, env)
else:
raise NotImplementedError