Dear @Usama_Hasan,
Thank you so much for your help, really appreciate. Yes this is the shape.
The shape of x= (no_samples,116)?
The shape of y=(no_samples,1)?
As you suggestion
super().__init__()
        self.fc1=nn.Linear(116,512)
        self.hidden = nn.Linear(512,517)
        self.mu = nn.Linear(517,25)
        self.sigma = nn.Linear(517,25)
        
        self.fc2 = nn.Linear(25,495)
        self.fc3 = nn.Linear(500,116)
        self.sigmoid = nn.Sigmoid()
        self.relu = nn.ReLU()

def encoder(self,x, y):
        h = self.relu(self.fc1(x))
        h1 = th.cat((h, y), dim = 1)
        h2 = self.relu(self.hidden(h1))
        h3 = self.hidden(h2)
        return self.mu(h3),self.sigma(h3)

It still returnig the same error
builtins.RuntimeError: size mismatch, m1: [512 x 517], m2: [512 x 517] at c:\a\w\1\s\windows\pytorch\aten\src\th\generic/THTensorMath.cpp:940