Open EliBenny opened 5 years ago
I think it is because of the version of pytorch, please try pytorch 0.3.0.
When trying to test I get:
File "../../encoder.py", line 48, in get_anchor_boxes xy = (xy * grid_size).view(fm_w, fm_h, 1, 2).expand(fm_w, fm_h, 9, 2) RuntimeError: expected type torch.FloatTensor but got torch.LongTensor
try: xy = (xy.float() * grid_size.float()).view(fm_w, fm_h, 1, 2).expand(fm_w, fm_h, 9, 2)
When trying to test I get:
File "../../encoder.py", line 48, in get_anchor_boxes xy = (xy * grid_size).view(fm_w, fm_h, 1, 2).expand(fm_w, fm_h, 9, 2) RuntimeError: expected type torch.FloatTensor but got torch.LongTensor