def test_lambda_metric_batch(self): metric = 'test' metric = lambda_metric('test')(metric) self.assertTrue(isinstance(metric, BatchLambda)) self.assertTrue(metric._metric_function == 'test')
def test_lambda_metric_batch(self): metric = 'test' metric = lambda_metric('test')(metric)().build() self.assertTrue(isinstance(metric, BatchLambda)) self.assertTrue(metric._metric_function == 'test')
def test_lambda_metric_epoch(self): metric = 'test' metric = lambda_metric('test', on_epoch=True)(metric) self.assertTrue(isinstance(metric, EpochLambda)) self.assertTrue(metric._final == 'test')
def test_lambda_metric_epoch(self): metric = 'test' metric = lambda_metric('test', on_epoch=True)(metric)().build() self.assertTrue(isinstance(metric, EpochLambda)) self.assertTrue(metric._final == 'test')