Sure,
Try this thou.



 Usama_Hasan:

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