Skip to content

Commit eb81c1f

Browse files
committed
Fix check_input_shape condition
1 parent 6b2ca90 commit eb81c1f

File tree

1 file changed

+1
-1
lines changed
  • segmentation_models_pytorch/base

1 file changed

+1
-1
lines changed

segmentation_models_pytorch/base/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def check_input_shape(self, x):
5050
def forward(self, x):
5151
"""Sequentially pass `x` trough model`s encoder, decoder and heads"""
5252

53-
if torch.jit.is_tracing() or self.requires_divisible_input_shape:
53+
if not torch.jit.is_tracing() and self.requires_divisible_input_shape:
5454
self.check_input_shape(x)
5555

5656
features = self.encoder(x)

0 commit comments

Comments
 (0)