Removing classifier layer from pretrained vgg16

Hello everyone. I loaded a pretrained vgg16 with libtorch. I want to remove the classifier so that the vgg16 will only outputs features map. How can i do that in libtorch ?