steps = len(loader)
pg = create_progress_bar(steps)
for x, y in loader:
y = np_utils.to_categorical(y, len(self.model.labels))
metrics = self.model.impl.test_on_batch(x, y)
for i in range(len(self.model.impl.metrics_names)):
name = self.model.impl.metrics_names[i]
name = ClassifyTrainerKeras.METRIC_REMAP.get(name, name)
test_metrics[name] = test_metrics.get(name, 0) + metrics[i]
pg.update()
pg.done()
for k, v in test_metrics.items():
test_metrics[k] /= steps
return test_metrics
After Change
steps = len(loader)
pg = create_progress_bar(steps)
for batch_dict in loader:
x, y = self.model.make_input(batch_dict)
metrics = self.model.impl.test_on_batch(x, y)
for i in range(len(self.model.impl.metrics_names)):
name = self.model.impl.metrics_names[i]
name = ClassifyTrainerKeras.METRIC_REMAP.get(name, name)