I'd like to use the pruned model and weight but, whenever I load the model or weight, this error messages keep popping up... My weight and model's files:
Error messages
I'd like to use the pruned model and weight but, whenever I load the model or weight, this error messages keep popping up... My weight and model's files:
Error messages
The reason why you have this error is that some weights present in the file you are trying to load have no corresponding parts in the initialized model (since it has been pruned). One quick way to go around that is to silent the warnings with the strict=False
option:
model.load_state_dict(state_dict, strict=False)
You can actually store the result of that call and log the missing and unexpected modules found in the file.