Solved by albanD in post #2 
              
              
                Hi, 
From the original densenet code, It looks like you’re missing an average pooling layer between the features and classifier