From f21df3983c4155bee02e73609fa2a32a87a2f666 Mon Sep 17 00:00:00 2001 From: Joseph Paul Cohen Date: Thu, 2 Jan 2025 18:27:25 -0800 Subject: [PATCH] remove call to upsample --- torchxrayvision/baseline_models/chexpert/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/torchxrayvision/baseline_models/chexpert/__init__.py b/torchxrayvision/baseline_models/chexpert/__init__.py index dcf03f0..d7cd022 100644 --- a/torchxrayvision/baseline_models/chexpert/__init__.py +++ b/torchxrayvision/baseline_models/chexpert/__init__.py @@ -57,7 +57,9 @@ def __init__(self, weights_zip="", num_models=30): def forward(self, x): x = x.repeat(1, 3, 1, 1) - x = self.upsample(x) + + x = utils.fix_resolution(x, 320, self) + utils.warn_normalization(x) # expecting values between [-1024,1024] x = x / 512 @@ -79,6 +81,7 @@ def forward(self, x): def features(self, x): x = x.repeat(1, 3, 1, 1) + x = utils.fix_resolution(x, 320, self) utils.warn_normalization(x)