Skip to content

in eval.py RuntimeError: legacy constructor expects device type: cpu but device type: cuda was passed #102

Open
@kwonseungchan

Description

@kwonseungchan

channge the code in utils.py 235 line

original_ind = torch.LongTensor(range(true_class_boxes.size(0)), device='cuda')[true_class_images == this_image][ind]
==>
original_ind = torch.tensor(range(true_class_boxes.size(0)), dtype=torch.long, device='cuda')[true_class_images == this_image][ind]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions