Solved by mrshenli in post #2 
              
              
                If you are trying to access the fc layer in the resnet50 wrapped by the DataParallel model, you can use model.module.fc, as DataParallel stores the provided model as self.module: