diff --git a/pytorch/model.py b/pytorch/model.py index 2d5d36a..ccd9abf 100644 --- a/pytorch/model.py +++ b/pytorch/model.py @@ -41,6 +41,7 @@ class Model(): self._model.eval() def __call__(self, img_tensor: torch.Tensor): + self._model.eval() features = self._model.forward_features(img_tensor) if features.dim() == 4: # if the shape of feature map is [N, C, H, W], where H > 1 and W > 1 global_pool = nn.AdaptiveAvgPool2d(1)