def __init__(self, model, lossfunc=F.mean_absolute_error ): super(LossEval, self).__init__() self.lossfunc = lossfunc with self.init_scope(): self.model = model