bugfix: Make sure stored input shapes are json serializable

This commit is contained in:
torzdf
2019-07-24 18:20:06 +00:00
parent 5c17417d4d
commit 7d613cfbb3
+2
View File
@@ -341,6 +341,8 @@ class ModelBase():
if not any(inp for inp in inputs.keys() if inp.startswith("face")):
raise ValueError("No input named 'face' was found. Check your input naming. "
"Current input names: {}".format(inputs))
# Make sure they are all ints so that it can be json serialized
inputs = {key: tuple(int(i) for i in val) for key, val in inputs.items()}
self.state.inputs = inputs
logger.debug("Added input shapes: %s", self.state.inputs)