-
- Downloads
Fix issue #26
The checkpoint file: examples/ssl/checkpoints/checkpoint_trained_channel_regularized_resnet20_finetuned.pth.tar did not contain the "thinning recipe" while the weight tensor stored within the checkpoint file have already been shrunk/thinned and this caused a mismatch. PyTorch models are defined in code. This includes the network architecture and connectivity (which layers are used and what is the forward path), but also the sizes for the parameter tensors and input/outputs. When the model is created the parameter tensors are also created, as defined or inferred from the code. When a checkpoint is loaded, they parameter tensors are read from the checkpoint and copied to the model's tensors. Therefore, the tensors in the checkpoint and in the model must have the same shape. If a model has been "thinned" and saved to a checkpoint, then the checkpoint tensors are "smaller" than the ones defined by the model. A "thinning recipe" is used to make changes to the model before copying the tensors from the checkpoint. In this case, the "thinning recipe" was missing.
No preview for this file type
Please register or sign in to comment