We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cc1cf2 commit 1fe4964Copy full SHA for 1fe4964
segmentation_models_pytorch/base/model.py
@@ -33,7 +33,8 @@ def check_input_shape(self, x):
33
def forward(self, x):
34
"""Sequentially pass `x` trough model`s encoder, decoder and heads"""
35
36
- self.check_input_shape(x)
+ if not torch.jit.is_tracing():
37
+ self.check_input_shape(x)
38
39
features = self.encoder(x)
40
decoder_output = self.decoder(*features)
0 commit comments