Tutorial-Book icon indicating copy to clipboard operation
Tutorial-Book copied to clipboard

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

Open utterances-bot opened this issue 4 years ago • 2 comments

4. RetinaNet — PseudoLab Tutorial Book

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

utterances-bot avatar Nov 09 '21 06:11 utterances-bot

안녕하세요 튜토리얼을 따라하다가 문제가 있는 것 같아서 글을 남깁니다. 튜토리얼의 맨 마지막 코드인 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.

hyeonjun-kang avatar Nov 09 '21 06:11 hyeonjun-kang

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

elibooklover avatar Jun 02 '22 19:06 elibooklover