tensorrtx
tensorrtx copied to clipboard
SWIN transformer pretrained model issue
trafficstars
About this repo
- commit - https://github.com/wang-xinyu/tensorrtx/commit/0f944b89750c2cd2e6be7933f84d61eb4e34ec83?
- model - SWIN-Transformer
Your problem
python gen_wts.py upernet_swin_tiny_patch4_window7_512x512.pth
Traceback (most recent call last):
File "gen_wts.py", line 8, in <module>
model = torch.load(pt_file, map_location=torch.device('cpu'))['model'].float() # load to FP32
KeyError: 'model'
Can you please provide the link to the pre-trained model you used for swin usecase or modify the script such that we are able to use the pretrained model from https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation repo ?
@wdhao was using a custom model, but the code can still be referenced.
@abhiagwl4262 If you can adapt the code to make it work with the pretrained model, then welcome your PR.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.