Could you post the modifications to the resnets?
The code works fine using vanilla resnet34 and fixing the num_features:
num_features = 2000
class MyEnsemble(nn.Module):
    def __init__(self, model, model1):
        super(MyEnsemble, self).__init__()
        self.model = model
        self.model1 = model1
        # vowel_diacritic
        self.fc1 = nn.Linear(num_features,11)
        # grapheme_root
        self.fc2 = nn.Linear(num_features,168)
        # consonant_diacritic
        self.fc3 = nn.Linear(num_features,7)

        
    def forward(self, x):
        x1 = self.model(x.clone())  # clone to make sure x is not changed by inplace methods
        x1 = x1.view(x1.size(0), -1)
        x2 = self.model1(x)
        x2 = x2.view(x2.size(0), -1)
        x = torch.cat((x1, x2), dim=1)
        x1 = self.fc1(x)
        x2 = self.fc2(x)
        x3 = self.fc3(x)
        return x1,x2,x3
    
    
model = MyEnsemble(models.resnet34(), models.resnet34())
x = torch.randn(2, 3, 224, 224)
output = model(x)