Open
Description
Should we guard the check:
https://github.com/pytorch/vision/blob/master/torchvision/models/inception.py#L174
with torch.jit.is_scripting()
? since if self.AuxLogits
is None we'll be compiling aux = self.AuxLogits(x)
and jit will complain that None is used as a function.
I changed it to
if not torch.jit.is_scripting() and aux_defined:
aux = self.AuxLogits(x)
else:
aux = None
and it worked.