I am not sure how to do that.
I did this and it gave me an error:
Input = torch.rand(1,3,5,5)

vgg16 = models.vgg16(pretrained=True)
new_base =  (list(vgg16.children())[:-1])[0]

new_base[:3](Input)


Input = torch.rand(1,3,5,5)

vgg16 = models.vgg16(pretrained=True)
new_base =  (list(vgg16.children())[:-1])[0]

vgg16.features[:3](Input)

both of the above cases cause an error and not working, can you please clarify how i should do that