NVIDIA/waveglow

Can not load model

yasntrk opened this issue · 1 comments

Hi, i trained a new model in waveglow. When i tried to load it i am getting this error:

RuntimeError: Error(s) in loading state_dict for WaveGlow: Missing key(s) in state_dict: "WN.0.cond_layers.0.bias", "WN.0.cond_layers.0.weight_g", "WN.0.cond_layers.0.weight_v", "WN.0.cond_layers.1.bias", "WN.0.cond_layers.1.weight_g", "WN.0.cond_layers.1.weight_v", "WN.0.cond_layers.2.bias", "WN.0.cond_layers.2.weight_g", "WN.0.cond_layers.2.weight_v", "WN.0.cond_layers.3.bias", "WN.0.cond_layers.3.weight_g", "WN.0.cond_layers.3.weight_v", "WN.0.cond_layers.4.bias", "WN.0.cond_layers.4.weight_g", "WN.0.cond_layers.4.weight_v", "WN.0.cond_layers.5.bias", "WN.0.cond_layers.5.weight_g", "WN.0.cond_layers.5.weight_v", "WN.0.cond_layers.6.bias", "WN.0.cond_layers.6.weight_g", "WN.0.cond_layers.6.weight_v", "WN.0.cond_layers.7.bias", "WN.0.cond_layers.7.weight_g", "WN.0.cond_layers.7.weight_v", "WN.1.cond_layers.0.bias", "WN.1.cond_layers.0.weight_g", "WN.1.cond_layers.0.weight_v", "WN.1.cond_layers.1.bias", "WN.1.cond_layers.1.weight_g", "WN.1.cond_layers.1.weight_v", "WN.1.cond_layers.2.bias", "WN.1.cond_layers.2.weight_g", "WN.1.cond_layers.2.weight_v", "WN.1.cond_layers.3.bias", "WN.1.cond_layers.3.weight_g", "WN.1.cond_layers.3.weight_v", "WN.1.cond_layers.4.bias", "WN.1.cond_layers.4.weight_g", "WN.1.cond_layers.4.weight_v", "WN.1.cond_layers.5.bias", "WN.1.cond_layers.5.weight_g", "WN.1.cond_layers.5.weight_v", "WN.1.cond_layers.6.bias", "WN.1.cond_layers.6.weight_g", "WN.1.cond_layers.6.weight_v", "WN.1.cond_layers.7.bias", "WN.1.cond_layers.7.weight_g", "WN.1.cond_layers.7.weight_v", "WN.2.cond_layers.0.bias", "WN.2.cond_laye... Unexpected key(s) in state_dict: "WN.0.cond_layer.bias", "WN.0.cond_layer.weight_g", "WN.0.cond_layer.weight_v", "WN.1.cond_layer.bias", "WN.1.cond_layer.weight_g", "WN.1.cond_layer.weight_v", "WN.2.cond_layer.bias", "WN.2.cond_layer.weight_g", "WN.2.cond_layer.weight_v", "WN.3.cond_layer.bias", "WN.3.cond_layer.weight_g", "WN.3.cond_layer.weight_v", "WN.4.cond_layer.bias", "WN.4.cond_layer.weight_g", "WN.4.cond_layer.weight_v", "WN.5.cond_layer.bias", "WN.5.cond_layer.weight_g", "WN.5.cond_layer.weight_v", "WN.6.cond_layer.bias", "WN.6.cond_layer.weight_g", "WN.6.cond_layer.weight_v", "WN.7.cond_layer.bias", "WN.7.cond_layer.weight_g", "WN.7.cond_layer.weight_v", "WN.8.cond_layer.bias", "WN.8.cond_layer.weight_g", "WN.8.cond_layer.weight_v", "WN.9.cond_layer.bias", "WN.9.cond_layer.weight_g", "WN.9.cond_layer.weight_v", "WN.10.cond_layer.bias", "WN.10.cond_layer.weight_g", "WN.10.cond_layer.weight_v", "WN.11.cond_layer.bias", "WN.11.cond_layer.weight_g", "WN.11.cond_layer.weight_v".

I couldn't find any useful solution in the Google. Any help would be appreciated

Here is my notebook: https://colab.research.google.com/drive/1CX1y10RVAE2f4ViST-P4wMHNm7P003sC?usp=sharing

I changed this:

waveglow.load_state_dict(torch.load(waveglow_pretrained_model)['model'].state_dict())
to this:

waveglow.load_state_dict(torch.load(waveglow_pretrained_model)['model'].state_dict(),strict=False)

and worked