I'm new to implementing CNNs and I'm trying to understand how a model knows whether to perform semantic classification (pixelwise) or image classification (one class per image). As far as I can see, the only difference is in the models/resnet_dilated.py file in the lines
resnet34_8s.fc = nn.Conv2d(resnet34_8s.inplanes, num_classes, 1)
whereas most other codes have it as
resnet34_8s.fc = nn.Conv2d(resnet34_8s.fc.in_features, num_classes)
Is this the difference between returning a logits of shape [batch x num_classes x H x W] and [batch x num_classes]?
I'm new to implementing CNNs and I'm trying to understand how a model knows whether to perform semantic classification (pixelwise) or image classification (one class per image). As far as I can see, the only difference is in the models/resnet_dilated.py file in the lines resnet34_8s.fc = nn.Conv2d(resnet34_8s.inplanes, num_classes, 1)
whereas most other codes have it as resnet34_8s.fc = nn.Conv2d(resnet34_8s.fc.in_features, num_classes)
Is this the difference between returning a logits of shape [batch x num_classes x H x W] and [batch x num_classes]?