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

Tutorial-Book/chapters/object-detection/Ch4-RetinaNet #102

Open
utterances-bot opened this issue Nov 9, 2021 · 2 comments
Open

Tutorial-Book/chapters/object-detection/Ch4-RetinaNet #102

utterances-bot opened this issue Nov 9, 2021 · 2 comments

Comments

@utterances-bot
Copy link

4. RetinaNet — PseudoLab Tutorial Book

https://pseudo-lab.github.io/Tutorial-Book/chapters/object-detection/Ch4-RetinaNet.html

Copy link

안녕하세요 튜토리얼을 따라하다가 문제가 있는 것 같아서 글을 남깁니다.
튜토리얼의 맨 마지막 코드인 mAP = torch.mean(AP)를 실행하는데 다음과 같은
오류가 발생합니다.

RuntimeError Traceback (most recent call last)
in ()
1 true_positives, pred_scores, pred_labels = [torch.cat(x, 0) for x in list(zip(*sample_metrics))] # 배치가 전부 합쳐짐
2 precision, recall, AP, f1, ap_class = utils.ap_per_class(true_positives, pred_scores, pred_labels, torch.tensor(labels))
----> 3 mAP = torch.mean(AP)
4 print(f'mAP : {mAP}')
5 print(f'AP : {AP}')

RuntimeError: Can only calculate the mean of floating types. Got Long instead.

Copy link
Member

@hyeonjun-kang dtype=torch.float64 여야 하는데, 데이터 처리과정에서 뭔가 누락된 것 같네요. 처음부터 하나씩 다시 실행보시는건 어떨까요~

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

3 participants