Closed MISSEY closed 1 year ago
When I load the vgg.pth from weights/v0.1/vgg.pth
, it gave me following error :
RuntimeError: Error(s) in loading state_dict for VGG:
Missing key(s) in state_dict: "features.0.weight", "features.0.bias", "features.2.weight", "features.2.bias", "features.5.weight", "features.5.bias", "features.7.weight", "features.7.bias", "features.10.weight", "features.10.bias", "features.12.weight", "features.12.bias", "features.14.weight", "features.14.bias", "features.17.weight", "features.17.bias", "features.19.weight", "features.19.bias", "features.21.weight", "features.21.bias", "features.24.weight", "features.24.bias", "features.26.weight", "features.26.bias", "features.28.weight", "features.28.bias", "classifier.0.weight", "classifier.0.bias", "classifier.3.weight", "classifier.3.bias", "classifier.6.weight", "classifier.6.bias".
Unexpected key(s) in state_dict: "lin0.model.1.weight", "lin1.model.1.weight", "lin2.model.1.weight", "lin3.model.1.weight", "lin4.model.1.weight".
Hi, from here, 'https://download.pytorch.org/models/vgg16-397923af.pth' is the one for VGG16
Thank you so much for your promt response :)
Could you explian why this line is commented out #self.parameters = list(self.net.parameters()) here https://github.com/boschresearch/ISSA/blob/main/training/lpips/dist_model.py#L77
gives me this error
TypeError: unsupported operand type(s) for +=: 'method' and 'list'
here https://github.com/boschresearch/ISSA/blob/main/training/lpips/dist_model.py#L82
Also found out that in rosinality repo line is not commented out https://github.com/rosinality/id-gan-pytorch/blob/master/stylegan2/lpips/dist_model.py#L86
Thankyou
are you passing 'is_train=False'? Since we don't want to train this part, it's just for feature extraction and loss computation.
Yes, I pass the is_train = True. I thought, I need to train the dist_model too. Ah I see, so for training the encoder, do not need to train dist_model ?
right, you don't need to train VGG16, it's just for LPIPS in the loss
Thnak you
Where to get the vgg16-tv.pth ? If it is download from pytorch hub, there is no configuration to set from where to download