semantic-segmentation-pytorch
semantic-segmentation-pytorch copied to clipboard
increase the fps
Replace lines 56-56 in "test.py" with the following:
# scores = torch.zeros(1, cfg.DATASET.num_class, segSize[0], segSize[1])
# scores = async_copy_to(scores, gpu)
to
scores = torch.zeros(1, cfg.DATASET.num_class, segSize[0], segSize[1], device=torch.device("cuda", gpu))
This change is to make a zeros tensor on the GPU.