Segmentation error when using inception_v3

I am facing an issue whereby using the inception_v3 network results in the error message

./train.sh: line 63: 20266 Segmentation fault (core dumped) CUDA_VISIBLE_DEVICES=None python train.py “${args[@]}”

class CRM(nn.Module):
    def __init__(self, args):
        super(CRM, self).__init__()
                 
        self.basenet = models.inception_v3(pretrained=True)
        self.basenet = torch.nn.Sequential(*(list(self.basenet.children())[:-1]))
                
    def forward(self, scenes):
  
        batch = len(scenes)                                               
        feature_map = self.basenet(scenes)

Simply replacing the inception network with ResNet works fine however. Can anyone tell me what is going on?

class CRM(nn.Module):
    def __init__(self, args):
        super(CRM, self).__init__()
                 
        self.basenet = models.resnet152(pretrained=True)
        self.basenet = torch.nn.Sequential(*(list(self.basenet.children())[:-2]))
                
    def forward(self, scenes):
  
        batch = len(scenes)                                               
        feature_map = self.basenet(scenes)

The Inception model returns in its default setting the aux_logits with the output as described in the original paper.
This logic is implemented in the forward method.
Wrapping all child modules in a nn.Sequential module will most likely not work properly in that case.
If you just need certain layers from the pre-trained model, you could derive from inception_v3 and manipulate the forward method as you wish.