Fix a bug on initializing benchmark results in JsonOutput
@@ -33,13 +33,13 @@ class JsonOutput():
Plsease see [Output Data Specification](https://github.com/LeapMind/lmnet/wiki/Output-Data-Specification).
"""
- def __init__(self, task, classes, image_size, data_format, bench={}):
+ def __init__(self, task, classes, image_size, data_format, bench=None):
assert task in Tasks
self.task = task
self.classes = classes
self.image_size = image_size
self.data_format = data_format
- self.bench = {}
+ self.bench = bench or {}
def _classification(self, outputs, raw_images, image_files):
assert outputs.shape == (len(image_files), len(self.classes))
