2020-12-18 16:18:34 +00:00
|
|
|
from trainer.eval.flow_gaussian_nll import FlowGaussianNll
|
|
|
|
from trainer.eval.sr_style import SrStyleTransferEvaluator
|
2020-12-18 16:24:31 +00:00
|
|
|
from trainer.eval.style import StyleTransferEvaluator
|
2020-11-13 18:03:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
def create_evaluator(model, opt_eval, env):
|
|
|
|
type = opt_eval['type']
|
|
|
|
if type == 'style_transfer':
|
|
|
|
return StyleTransferEvaluator(model, opt_eval, env)
|
2020-11-15 03:16:07 +00:00
|
|
|
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)
|
2020-11-13 18:03:54 +00:00
|
|
|
else:
|
|
|
|
raise NotImplementedError()
|