diff --git a/minerva/analysis/metrics/transformed_metrics.py b/minerva/analysis/metrics/transformed_metrics.py index b394b1f..23d65c0 100644 --- a/minerva/analysis/metrics/transformed_metrics.py +++ b/minerva/analysis/metrics/transformed_metrics.py @@ -177,5 +177,5 @@ def resize(self, x: torch.Tensor) -> torch.Tensor: elif self.target_w_size is None: scale = target_h_size / h target_w_size = int(w * scale) - x = x.to(torch.uint8) if x.type() == "torch.LongTensor" else x + x = x.to(torch.uint8) if "LongTensor" in x.type() else x return torch.nn.functional.interpolate(x, size=(target_h_size, target_w_size))