From 42481d0056fcac471a9029605d691e0c9b394756 Mon Sep 17 00:00:00 2001 From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu> Date: Thu, 18 Feb 2021 15:52:22 +0100 Subject: [PATCH] Flatten arrays required. --- pysegcnn/core/trainer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pysegcnn/core/trainer.py b/pysegcnn/core/trainer.py index 7ebcd1e..8e25202 100644 --- a/pysegcnn/core/trainer.py +++ b/pysegcnn/core/trainer.py @@ -2538,9 +2538,9 @@ class NetworkInference(BaseConfig): batch + 1, len(self.dataloader)) # check if tensor is on gpu and convert to numpy array - inputs = inputs.cpu().numpy() - labels = labels.cpu().numpy() - prdctn = prdctn.cpu().numpy() + inputs = inputs.cpu().numpy().flatten(axis=0) + labels = labels.cpu().numpy().flatten(axis=0) + prdctn = prdctn.cpu().numpy().flatten(axis=0) # check whether to reconstruct the scenes of a dataset if self.predict_scene: -- GitLab