From 7d613cfbb319bcb5a778f950bb0281dfdfbbcf6f Mon Sep 17 00:00:00 2001 From: torzdf <36920800+torzdf@users.noreply.github.com> Date: Wed, 24 Jul 2019 18:20:06 +0000 Subject: [PATCH] bugfix: Make sure stored input shapes are json serializable --- plugins/train/model/_base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/train/model/_base.py b/plugins/train/model/_base.py index c2db953b..51faf976 100644 --- a/plugins/train/model/_base.py +++ b/plugins/train/model/_base.py @@ -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)