I have changed the in_features in self.seq2 to 254016 but still the error persists.
    def __init__(self):
        super(BuildingSegmenterNet, self).__init__()
        self.seq1 = nn.Sequential(
            nn.Conv2d(3, 16, (5,5)),
            nn.MaxPool2d((2,2))
        )
        self.seq2 = nn.Sequential(
            nn.Linear((254016), 512),
            nn.ReLU()
        )
        self.dropout1 = nn.Dropout(0.33)
        self.seq3 = nn.Sequential(
            nn.Linear(512, 128),
            nn.ReLU()
        )

Have I made the proper changes as you mentioned