def forward(self, x):
"""
Run the forward pass of the DenseNet model.
"""
out = self.conv(x)
out = self.block(out)
out = F.avg_pool2d(out, 8)
out = out.view(-1, self.out_channels)
out = self.fc(out)
return out