@albanD
self.network.state_dict()[key].copy_(new_state_dict[key])

results in a
RuntimeError: The size of tensor a (32) must match the size of tensor b (13) at non-singleton dimension 0

since the given tensors have a reduced dimension.
The goal is to load pruned networks (in my case pruned Yolov2 networks) that have been saved during pruning process. The idea was to create a wrapper class that initiates the original network and adjusts it so it can load in the weights of a pruned version of itself, without knowing beforehand what the size of each tensor will be. I hadn’t fully considered the layers parameters yet but I assumed these were accessible from the saved file aswell?