This worked for me
def bninception(num_classes=1000, pretrained=None, path='/workspace/model/bn_inception.pth'):
    model = BNInception(num_classes=num_classes)
    if pretrained is not None:
        # First load the model weights into a dictionary
        state_dict = torch.load(path)
        # Update the weight shapes for layers by iterating the dictionary
        for name, weights in state_dict.items():
            if 'conv1_7x7_s2_bn' in name or 'conv2_3x3' in name or 'inception' in name:
                if len(weights.size()) == 2:
                    state_dict[name] = weights.view(-1)

        # Load the updated weights into a model
        model.load_state_dict(state_dict)