'Sequential' object has no attribute 'classifier'
How to find in_features of a Pytorch model? model.classifier.in_features is working on densenet121 but nit on vgg18, is there any function which may work on all torchvision models?

classifier is a Sequential module in the VGG's implementation, so, if you want to access the in_features passed to the classifier, you have to check the in_features of the first layer.

models.vgg19().classifier[0].in_features


It seems like different implementations follow different patterns, so the best way to determine in_features for all the models would be to check the source code directly. 
