DL-Art-School/codes/models/eval/__init__.py

15 lines
565 B
Python
Raw Normal View History

2020-12-02 21:09:54 +00:00
from models.eval.flow_gaussian_nll import FlowGaussianNll
from models.eval.sr_style import SrStyleTransferEvaluator
from models.eval.style import StyleTransferEvaluator
def create_evaluator(model, opt_eval, env):
type = opt_eval['type']
if type == 'style_transfer':
return StyleTransferEvaluator(model, opt_eval, env)
elif type == 'sr_stylegan':
return SrStyleTransferEvaluator(model, opt_eval, env)
2020-12-02 21:09:54 +00:00
elif type == 'flownet_gaussian':
return FlowGaussianNll(model, opt_eval, env)
else:
raise NotImplementedError()