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

According to the instructions in the README, I encountered a ValueError: Buffer dtype mismatch, expected 'int' but got 'long' in train.py at the 20th epoch. #4

Open
Leelibrary opened this issue Apr 2, 2024 · 1 comment

Comments

@Leelibrary
Copy link

Traceback (most recent call last):
File "/home/lab/libr/WakeNet/eval.py", line 100, in
evaluate(arg.target_size,
File "/home/lab/libr/WakeNet/eval.py", line 85, in evaluate
results = data_evaluate(model, target_size, test_path, conf, dataset)
File "/home/lab/libr/WakeNet/eval.py", line 43, in data_evaluate
dets = im_detect(model, im, target_sizes=target_size, conf=conf)
File "/home/lab/libr/WakeNet/utils/detect.py", line 12, in im_detect
return single_scale_detect(model, src, target_size=target_sizes[0], use_gpu=use_gpu, conf=conf)
File "/home/lab/libr/WakeNet/utils/detect.py", line 36, in single_scale_detect
scores, classes, boxes, landmarks = model(im, test_conf=conf)
File "/opt/anaconda3/envs/libr/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lab/libr/WakeNet/models/WakeNet.py", line 106, in forward
return self.decoder(imgs, anchors_list[-1], cls_score, bbox_pred, land_pred, test_conf=test_conf)
File "/home/lab/libr/WakeNet/models/WakeNet.py", line 124, in decoder
anchors_nms_idx = nms(torch.cat([bboxes.float(), scores.float()], dim=2)[0, :, :], nms_thresh)
File "/home/lab/libr/WakeNet/utils/nms_wrapper.py", line 13, in nms
return cpu_nms(dets, thresh) # 加了个int
File "cpu_nms.pyx", line 153, in cpu_nms.cpu_nms
ValueError: Buffer dtype mismatch, expected 'int' but got 'long'

@hl-gl
Copy link

hl-gl commented Sep 11, 2024

How to solve this error?
Traceback (most recent call last):
File "train.py", line 12, in
from models.WakeNet import WakeNet
File "/data/l/lh/wake_detection/coda/WakeNet-main/models/WakeNet.py", line 6, in
from models.MultiHeads import CLSHead, REGHead, LDMHead
File "/data/l/lh/wake_detection/coda/WakeNet-main/models/MultiHeads.py", line 4, in
from models.RT import RT
File "/data/l/lh/wake_detection/coda/WakeNet-main/models/RT.py", line 2, in
from utils._cdht.dht_func import C_dht
File "/data/l/lh/wake_detection/coda/WakeNet-main/utils/_cdht/dht_func.py", line 2, in
import deep_hough as dh
ModuleNotFoundError: No module named 'deep_hough'

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

2 participants