I have two models, the first is a basic perception: -
## Perceptron

class Model (nn.Module):
    def __init__(self, input_size, output_size):
        super().__init__()
        self.linear = nn.Linear(input_size, output_size)
        
    def forward(self, x):
        x = torch.sigmoid(self.linear(x))
        return(x)
    
    def predict(self, x):
      pred = self.forward(x)
      if pred >= 0.5:
        return 1
      else: 
        return 0

This model reaches 100% accuracy on the train data after ~1000 epochs and ~87% on the test dataset.  I then tried a model with an additional layer: -
class Model (nn.Module):
    def __init__(self, input_size, H1, output_size):
        super().__init__()
        self.linear = nn.Linear(input_size, H1)
        self.linear2 = nn.Linear(H1, output_size)
        
    def forward(self, x):
        x = torch.sigmoid(self.linear(x))
        x = torch.sigmoid(self.linear2(x))
        return(x)
    
    def predict(self, x):
      pred = self.forward(x)
      if pred >= 0.5:
        return 1
      else: 
        return 0

Even across a wide range of sensible values for H1 (e.g. 5, 50, 500), this model reaches an accuracy of ~23% after 100-200 epochs and remains there after 2000 epochs.
Have I made a blunder here?
Edit: On further inspection, the 2nd model outputs the same class prediction for each input, which is the majority class (23% of the data).