semantic-segmentation-pytorch icon indicating copy to clipboard operation
semantic-segmentation-pytorch copied to clipboard

increase the fps

Open hjinlee88 opened this issue 6 years ago • 0 comments

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.

hjinlee88 avatar Sep 25 '19 04:09 hjinlee88