Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I met a error when train with this code. #7

Open
xiaoLiu0531 opened this issue May 20, 2022 · 0 comments
Open

I met a error when train with this code. #7

xiaoLiu0531 opened this issue May 20, 2022 · 0 comments

Comments

@xiaoLiu0531
Copy link

I used glue datasets and custom datasets ,but met the same question:
File "D:/program/keypoint_rcnn_training_pytorch-main/trainer.py", line 164, in
train_one_epoch(model, optimizer, data_loader_train, device, epoch, print_freq=1000)
File "D:\program\keypoint_rcnn_training_pytorch-main\engine.py", line 31, in train_one_epoch
loss_dict = model(images, targets)
File "E:\python38\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "E:\python38\lib\site-packages\torchvision\models\detection\generalized_rcnn.py", line 99, in forward
detections, detector_losses = self.roi_heads(features, proposals, images.image_sizes, targets)
File "E:\python38\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "E:\python38\lib\site-packages\torchvision\models\detection\roi_heads.py", line 740, in forward
assert t["labels"].dtype == torch.int64, "target labels must of int64 type"
KeyError: 'labels'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant