How to get a couple of separate pretrained models?

vgg16 = models.vgg16(pretrained=True)
vgg16_ = models.vgg16(pretrained=True)

I want to know if vgg16 and vgg16_ are pointing to the same memory address? If yes, how do I get two separate vgg16 models? And, also how do I check this?


No they will be pointing to different memory.
You can check that by checking the data_ptr() of the different weights and make sure they don’t match.

1 Like

Can you also answer the other question I just posted. Thank u