After forward passing it should be outputting the class prediction, as it contains,
       features = self.features(x)
       out = F.relu(features, inplace=True)
       out = F.adaptive_avg_pool2d(out, (1, 1)).view(features.size(0), -1)
       out = self.classifier(out)
       return out

But it returning the same shape.
Code:

  
      github.com
  
  
    YakinRubaiat/chexnet/blob/master/HeatmapGenerator.py 1
import os
import numpy as np
import time
import sys
import re
from PIL import Image

import cv2

import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torchvision
import torchvision.transforms as transforms

from DensenetModels import DenseNet121
from DensenetModels import DenseNet169
from DensenetModels import DenseNet201

#-------------------------------------------------------------------------------- 


  This file has been truncated. show original

  
  
    
    
  
  



  
      github.com
  
  
    YakinRubaiat/chexnet/blob/master/DensenetModels.py 3
import os
import numpy as np

import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn

import torchvision.transforms as transforms
from torch.utils.data import DataLoader
from sklearn.metrics import roc_auc_score

import torchvision

class DenseNet121(nn.Module):

    def __init__(self, classCount, isTrained):
	
        super(DenseNet121, self).__init__()
		
        self.densenet121 = torchvision.models.densenet121(pretrained=isTrained)


  This file has been truncated. show original