Skip to content

Commit 1fe4964

Browse files
committed
Remove from tracing shape check
1 parent 0cc1cf2 commit 1fe4964

File tree

1 file changed

+2
-1
lines changed
  • segmentation_models_pytorch/base

1 file changed

+2
-1
lines changed

segmentation_models_pytorch/base/model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def check_input_shape(self, x):
3333
def forward(self, x):
3434
"""Sequentially pass `x` trough model`s encoder, decoder and heads"""
3535

36-
self.check_input_shape(x)
36+
if not torch.jit.is_tracing():
37+
self.check_input_shape(x)
3738

3839
features = self.encoder(x)
3940
decoder_output = self.decoder(*features)

0 commit comments

Comments
 (0)