Hello. I am training an autoencoder uisng pytorch lightning. I'm using the MNIST…
- User
Hello. I am training an autoencoder uisng pytorch lightning. I'm using the MNIST training set of images. I have an encoder and decoder set up like so:
Okay, I changed the encoder and decoder to:
class Encoder(nn.Module): def init(self): super().init() self.l1 = nn.Sequential(nn.Linear(28 * 28, 64), nn.ReLU()) self.l2 = nn.Sequential(nn.Linear(64, 32), nn.ReLU()) self.l3 = nn.Sequential(nn.Linear(32, 16), nn.ReLU()) self.l4 = nn.Sequential(nn.Linear(16, 8), nn.ReLU()) self.final = nn.Linear(8, 3)
def forward(self, x): x = self.l1(x) x = self.l2(x) x = self.l3(x) x = self.l4(x) return self.final(x) class Decoder(nn.Module): def init(self): super().init() self.l1 = nn.Sequential(nn.Linear(3, 64), nn.ReLU(), nn.Linear(64, 28 * 28)) self.l2 = nn.Sequential(nn.Linear(64, 32), nn.ReLU()) self.l3 = nn.Sequential(nn.Linear(32, 16), nn.ReLU()) self.l4 = nn.Sequential(nn.Linear(16, 8), nn.ReLU()) self.final = nn.Linear(8, 3)
def forward(self, x): x = self.l1(x) x = self.l2(x) x = self.l3(x) x = self.l4(x) return self.final(x) But I get an error: RuntimeError: linear(): input and weight.T shapes cannot be multiplied (32x784 and 64x32)
HOwever, when I run it, I get this error: RuntimeError: linear(): input and weight.T shapes cannot be multiplied (32x784 and 64x32)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.