The error doesn’t match the posted code, as you are not using model.norm() anywhere.



 Myailab:

May I know how do i get to ‘return features’ from ‘get_resnet34(num_classes=6, **_)’, instead of ‘returning model’.


After creating the model, you could replace the last linear layer with an nn.Identity module to get the features instead of the logits from the last layer.