TheModelClass would be VGGFeatures in your case. You have to create a model with randomly initialized weights and afterwords replace these random weights with your saved weights to keep it directory independent.