The model should be initialized in init as bellow and inferred in forward
layers = []for _ in range(self.num_mixers):layers.append(Mixer_Layer(self.num_patches,self.num_features,self.expansion_token,self.expansion_channel,self.dropout))self.model = nn.Sequential(*layers)
The model should be initialized in init as bellow and inferred in forward
layers = []
for _ in range(self.num_mixers):
layers.append(Mixer_Layer(self.num_patches,
self.num_features,
self.expansion_token,
self.expansion_channel,
self.dropout))
self.model = nn.Sequential(*layers)